changeset f5b4fcbd7686 in modules/product_kit:6.2
details: 
https://hg.tryton.org/modules/product_kit?cmd=changeset&node=f5b4fcbd7686
description:
        Copy components without parent_product when duplicating templates

        issue11854
        review418561003
        (grafted from 699d42badcf0aed4fbe232d0e401e04ddad6bab6)
diffstat:

 product.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r c6336a37aa76 -r f5b4fcbd7686 product.py
--- a/product.py        Tue Oct 18 00:01:02 2022 +0200
+++ b/product.py        Thu Nov 03 09:15:38 2022 +0100
@@ -50,7 +50,7 @@
             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, {

Reply via email to