changeset 0a1b68ee851f in modules/account_invoice:5.0
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=0a1b68ee851f
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 713ffeaf3450 -r 0a1b68ee851f account.py
--- a/account.py Wed Sep 01 22:59:39 2021 +0200
+++ b/account.py Fri Oct 29 17:03:20 2021 +0200
@@ -220,6 +220,12 @@
cls._check_modify_exclude.add('invoice_payment')
@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')