mirror of
https://github.com/NaN-tic/trytond-product_cost_plan.git
synced 2023-12-14 03:03:11 +01:00
parent
955f8bad4a
commit
b92142b0db
5
plan.py
5
plan.py
|
@ -449,12 +449,7 @@ class Plan(DeactivableMixin, ModelSQL, ModelView):
|
|||
|
||||
@classmethod
|
||||
def delete(cls, plans):
|
||||
CostLine = Pool().get('product.cost.plan.cost')
|
||||
to_delete = []
|
||||
for plan in plans:
|
||||
to_delete += plan.costs
|
||||
with Transaction().set_context(reset_costs=True):
|
||||
CostLine.delete(to_delete)
|
||||
super(Plan, cls).delete(plans)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue