From d83f5e467d8aea9a14b7ade6a608018cf7846212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 29 Oct 2021 17:03:20 +0200 Subject: [PATCH] Do not copy invoice payments when copying move lines issue10502 review367121002 (grafted from 24ecdc76c60aedbd4f62501e46338371b9fabce1) --HG-- branch : 6.0 --- account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/account.py b/account.py index 91ef6e3779..c3b4b4b320 100644 --- a/account.py +++ b/account.py @@ -260,6 +260,12 @@ class MoveLine(metaclass=PoolMeta): return super()._get_origin() + [ '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()