changeset de52945e5a1f in modules/account_invoice:6.0
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=de52945e5a1f
description:
        Do not copy invoice payments when copying move lines

        issue10502
        review367121002
        (grafted from 24ecdc76c60aedbd4f62501e46338371b9fabce1)
diffstat:

 account.py |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 8fdde22c6a2d -r de52945e5a1f account.py
--- a/account.py        Wed Sep 01 22:59:02 2021 +0200
+++ b/account.py        Fri Oct 29 17:03:20 2021 +0200
@@ -261,6 +261,12 @@
             'account.invoice.line', 'account.invoice.tax']
 
     @classmethod
+    def copy(cls, lines, default=None):
+        default = {} if default is None else default.copy()
+        default.setdefault('invoice_payments', None)
+        return super().copy(lines, default=default)
+
+    @classmethod
     def get_invoice_payment(cls, lines, name):
         pool = Pool()
         InvoicePaymentLine = pool.get('account.invoice-account.move.line')

Reply via email to