Fix tests.
This commit is contained in:
parent
8d03eff9cc
commit
d08a80d270
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 New Issue