changeset 324570db0796 in modules/sale_complaint:default details: https://hg.tryton.org/modules/sale_complaint?cmd=changeset&node=324570db0796 description: Clear result when copying actions
issue10198 review343921003 diffstat: complaint.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diffs (19 lines): diff -r 798f897d6be1 -r 324570db0796 complaint.py --- a/complaint.py Thu Mar 11 23:00:10 2021 +0100 +++ b/complaint.py Wed Mar 17 15:10:18 2021 +0100 @@ -518,6 +518,15 @@ models = cls._get_result() return [(None, '')] + [(m, get_name(m)) for m in models] + @classmethod + def copy(cls, actions, default=None): + if default is None: + default = {} + else: + default = default.copy() + default.setdefault('result', None) + return super().copy(actions, default=default) + def do(self): return getattr(self, 'do_%s' % self.action)()