From 63ef97ca4fd73eeeb9ad0ab8bb972609081d7897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 19 Sep 2025 14:04:29 +0200 Subject: [PATCH] Use only components without product from the template as the default components for the product Closes #14246 --- modules/product_kit/product.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/product_kit/product.py b/modules/product_kit/product.py index 776fd8758b..27dccf8544 100644 --- a/modules/product_kit/product.py +++ b/modules/product_kit/product.py @@ -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):