changeset fc876c335cd1 in modules/account_payment_clearing:4.6
details: 
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset;node=fc876c335cd1
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 a76ae41c8b0d -r fc876c335cd1 payment.py
--- a/payment.py        Sat Jan 05 18:50:05 2019 +0100
+++ b/payment.py        Thu Jun 27 21:41:55 2019 +0200
@@ -215,6 +215,15 @@
             for lines in to_reconcile[party].itervalues():
                 Line.reconcile(lines)
 
+    @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