mirror of
https://github.com/NaN-tic/trytond-product_cost_plan.git
synced 2023-12-14 03:03:11 +01:00
Fix tests.
This commit is contained in:
parent
23a0389d6a
commit
f9141a80ce
3
plan.py
3
plan.py
|
@ -556,7 +556,8 @@ class PlanProductLine(ModelSQL, ModelView, tree(separator='/')):
|
|||
@fields.depends('children', 'product', 'plan', '_parent_plan.uom')
|
||||
def on_change_with_uom_category(self, name=None):
|
||||
if self.children:
|
||||
uoms = set([child.uom.category for child in self.children])
|
||||
uoms = set([child.uom.category for child in self.children
|
||||
if child.uom])
|
||||
if len(uoms) == 1:
|
||||
return list(uoms)[0].id
|
||||
elif self.product:
|
||||
|
|
Loading…
Reference in a new issue