Use only components without product from the template as the default components for the product

Closes #14246
(grafted from a18da648907c39895f364502b1e361a51439f462)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2025-09-19 14:04:29 +02:00
1 parent 4ec6f578bc
commit 04145de814
1 file changed
+6 -1
+6 -1
View File
@@ -77,7 +77,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):