Add view type as allowed warehouse parent

issue10487
review331041002
This commit is contained in:
Sergio Morillo
2021-06-09 18:03:23 +02:00
parent 3910591e06
commit eccefb4882
2 changed files with 3 additions and 5 deletions
+2
View File
@@ -1,3 +1,5 @@
* Allow view location as parent of warehouse
Version 6.0.0 - 2021-05-03
* Bug fixes (see mercurial logs for details)
* Allow shipments to be automatically assigned
+1 -5
View File
@@ -64,10 +64,6 @@ class Location(DeactivableMixin, tree(), ModelSQL, ModelView):
type_string = type.translated('type')
parent = fields.Many2One("stock.location", "Parent", select=True,
left="left", right="right",
states={
'invisible': Eval('type') == 'warehouse',
},
depends=['type'],
help="Used to add structure above the location.")
left = fields.Integer('Left', required=True, select=True)
right = fields.Integer('Right', required=True, select=True)
@@ -221,7 +217,7 @@ class Location(DeactivableMixin, tree(), ModelSQL, ModelView):
'lost_found': ['lost_found'],
'view': ['warehouse', 'view', 'storage'],
'storage': ['warehouse', 'view', 'storage'],
'warehouse': [''],
'warehouse': ['view'],
}
@classmethod