changeset 583d2c7d7b59 in modules/account_payment:5.0
details:
https://hg.tryton.org/modules/account_payment?cmd=changeset&node=583d2c7d7b59
description:
Clear group when copying payments
issue10174
review357351016
(grafted from 2d3ba9174b8169ee320068b85cb4eede3bdad574)
diffstat:
payment.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r e3bdc7888fb5 -r 583d2c7d7b59 payment.py
--- a/payment.py Wed Dec 02 19:47:11 2020 +0100
+++ b/payment.py Wed Mar 10 11:43:34 2021 +0100
@@ -288,6 +288,15 @@
return [(None, '')] + [(m.model, m.name) for m in models]
@classmethod
+ def copy(cls, payments, default=None):
+ if default is None:
+ default = {}
+ else:
+ default = default.copy()
+ default.setdefault('group', None)
+ return super().copy(payments, default=default)
+
+ @classmethod
def delete(cls, payments):
for payment in payments:
if payment.state != 'draft':