Updated validate method to check location unique_children

This commit is contained in:
MarinaNico 2021-02-26 13:09:28 +01:00
parent 8312d3c49f
commit 7502a19562

View file

@ -26,6 +26,7 @@ class Location(metaclass=PoolMeta):
len(location.parent.childs) > 1):
raise UserError(
gettext('stock_location_only_child.msg_only_child'))
elif location.unique_children and len(location.childs) > 1:
if location.unique_children and len(location.childs) > 1:
raise UserError(
gettext('stock_location_only_child.msg_only_child'))