changeset 56dc600a4c8d in modules/account_stock_landed_cost:6.2 details: https://hg.tryton.org/modules/account_stock_landed_cost?cmd=changeset&node=56dc600a4c8d description: Clear invoice lines when copying landed cost
issue11474 review427131003 (grafted from bbcd995376803e6f1a75885eb64f8ee59e8f3e77) diffstat: account.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diffs (16 lines): diff -r 07de0a107f31 -r 56dc600a4c8d account.py --- a/account.py Fri Dec 03 21:53:42 2021 +0100 +++ b/account.py Wed May 11 11:26:36 2022 +0200 @@ -415,6 +415,12 @@ company=values.get('company', default_company)).get() return super(LandedCost, cls).create(vlist) + @classmethod + def copy(cls, landed_costs, default=None): + default = default.copy() if default is not None else {} + default.setdefault('invoice_lines', None) + return super().copy(landed_costs, default=default) + class LandedCost_Shipment(ModelSQL): 'Landed Cost - Shipment'