diff --git a/CHANGELOG b/CHANGELOG index 3ece55012f..8fdd1cb3e5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/location.py b/location.py index 4c7e4d5ba3..cc3d8cf661 100644 --- a/location.py +++ b/location.py @@ -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