Clear invoice lines when copying landed cost

issue11474
review427131003
This commit is contained in:
Maxime Richez
2022-05-11 11:26:36 +02:00
parent 2c0bb8ff4d
commit eed756c15c
+6
View File
@@ -422,6 +422,12 @@ class LandedCost(Workflow, ModelSQL, ModelView, MatchMixin):
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'