changeset 384da858827b in modules/production_work:5.4
details:
https://hg.tryton.org/modules/production_work?cmd=changeset;node=384da858827b
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 18948a7fe92d -r 384da858827b production.py
--- a/production.py Mon Nov 04 13:03:13 2019 +0100
+++ b/production.py Tue Dec 03 18:42:46 2019 +0100
@@ -132,3 +132,12 @@
production=production.rec_name,
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)