changeset 488cacb8538c in modules/account_payment:5.8
details: 
https://hg.tryton.org/modules/account_payment?cmd=changeset&node=488cacb8538c
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 5115942b89df -r 488cacb8538c payment.py
--- a/payment.py        Fri Jan 01 16:20:43 2021 +0100
+++ b/payment.py        Wed Mar 10 11:43:34 2021 +0100
@@ -438,6 +438,15 @@
         return Journal.fields_get([field_name])[field_name]['selection']
 
     @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':

Reply via email to