changeset b289244a56fa in modules/account_payment_clearing:4.4
details: 
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset;node=b289244a56fa
description:
        Remove clearing move on copy

        issue8412
        review271571002
        (grafted from dd858dac381ed834dc0c5ee9b149cd07b8ad9394)
diffstat:

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

diffs (19 lines):

diff -r bd4337a70b3f -r b289244a56fa payment.py
--- a/payment.py        Mon May 01 21:14:58 2017 +0200
+++ b/payment.py        Thu Jun 27 21:41:55 2019 +0200
@@ -174,6 +174,15 @@
 
         cls.write(payments, {'clearing_move': None})
 
+    @classmethod
+    def copy(cls, payments, default=None):
+        if default is None:
+            default = {}
+        else:
+            default = default.copy()
+        default.setdefault('clearing_move')
+        return super(Payment, cls).copy(payments, default=default)
+
 
 class Succeed(Wizard):
     "Succeed Payment"

Reply via email to