Fix location domain if warehouse is empty
This commit is contained in:
1 parent
e4edde5691
commit
e5fdf77e22
1 file changed
+1
-1
+1
-1
@@ -17,7 +17,7 @@ class ProductLocation(ModelSQL, ModelView):
|
||||
domain=[('type', '=', 'warehouse')])
|
||||
location = fields.Many2One('stock.location', 'Storage Location',
|
||||
required=True, domain="[('type', '=', 'storage'), " \
|
||||
"('parent', 'child_of', [warehouse])]")
|
||||
"('parent', 'child_of', warehouse and [warehouse] or [])]")
|
||||
sequence = fields.Integer('Sequence')
|
||||
|
||||
def __init__(self):
|
||||
|
||||
Reference in new issue
Block a user