changeset 24ecdc76c60a in modules/account_invoice:default details: https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=24ecdc76c60a description: Do not copy invoice payments when copying move lines
issue10502 review367121002 diffstat: account.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diffs (16 lines): diff -r d653206ef0ca -r 24ecdc76c60a account.py --- a/account.py Thu Oct 21 00:03:36 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')