Use only components without product from the template as the default components for the product
Closes #14246
This commit is contained in:
@@ -82,7 +82,12 @@ class Product(metaclass=PoolMeta):
|
||||
|
||||
@property
|
||||
def components_used(self):
|
||||
return self.components or self.template.components
|
||||
if self.components:
|
||||
yield from self.components
|
||||
else:
|
||||
for component in self.template.components:
|
||||
if not component.parent_product:
|
||||
yield component
|
||||
|
||||
@classmethod
|
||||
def get_quantity(cls, products, name):
|
||||
|
||||
Reference in New Issue
Block a user