mirror of
https://github.com/NaN-tic/trytond-stock_location_only_child.git
synced 2023-12-14 05:52:54 +01:00
Updated validate method to check location unique_children
This commit is contained in:
parent
8312d3c49f
commit
7502a19562
3
stock.py
3
stock.py
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue