Copy components without parent_product when duplicating templates

issue11854
review418561003
This commit is contained in:
Sergi Almacellas Abellana
2022-11-03 09:15:38 +01:00
parent 443605786f
commit 24d5b999d2
+1 -1
View File
@@ -49,7 +49,7 @@ class Template(metaclass=PoolMeta):
to_copy = []
for template, new_template in zip(templates, new_templates):
to_copy.extend(
c for c in template.components if not c.product)
c for c in template.components if not c.parent_product)
old2new[template.id] = new_template.id
if to_copy:
Component.copy(to_copy, {