Avoid crash when adding operation lines manually.
This commit is contained in:
parent
16042c0ea1
commit
a8bd8a7958
2
plan.py
2
plan.py
|
@ -151,7 +151,7 @@ class Plan:
|
|||
|
||||
type_ = CostType(ModelData.get_id('product_cost_plan_operation',
|
||||
'operations'))
|
||||
self.operation_cost = sum(o.cost for o in self.operations)
|
||||
self.operation_cost = sum(o.cost for o in self.operations if o.cost)
|
||||
return self.update_cost_type(type_, self.operation_cost)
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in New Issue