changeset 5f66d489a215 in modules/production_work:5.0
details: 
https://hg.tryton.org/modules/production_work?cmd=changeset;node=5f66d489a215
description:
        Clear works when copying productions

        issue8887
        review272591002
        (grafted from dfa96fcc9f160f3c8179e7496b8514e5719635b0)
diffstat:

 production.py |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 6c85fd83c4bb -r 5f66d489a215 production.py
--- a/production.py     Fri Nov 08 19:41:19 2019 +0100
+++ b/production.py     Tue Dec 03 18:42:46 2019 +0100
@@ -139,3 +139,12 @@
                             'work': work.rec_name,
                             })
         super(Production, cls).done(productions)
+
+    @classmethod
+    def copy(cls, productions, default=None):
+        if default is None:
+            default = {}
+        else:
+            default = default.copy()
+        default.setdefault('works')
+        return super().copy(productions, default=default)

Reply via email to