From eccefb4882d8db1acf304b03c62937f26b427dfa Mon Sep 17 00:00:00 2001 From: Sergio Morillo Date: Wed, 9 Jun 2021 18:03:23 +0200 Subject: [PATCH] Add view type as allowed warehouse parent issue10487 review331041002 --- CHANGELOG | 2 ++ location.py | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) 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