changeset 18221f41c826 in modules/stock:default details: https://hg.tryton.org/modules/stock?cmd=changeset&node=18221f41c826 description: Add view type as allowed warehouse parent
issue10487 review331041002 diffstat: CHANGELOG | 2 ++ location.py | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diffs (32 lines): diff -r 6ee0054a3cd5 -r 18221f41c826 CHANGELOG --- a/CHANGELOG Sun May 16 17:43:33 2021 +0200 +++ b/CHANGELOG Wed Jun 09 18:03:23 2021 +0200 @@ -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 -r 6ee0054a3cd5 -r 18221f41c826 location.py --- a/location.py Sun May 16 17:43:33 2021 +0200 +++ b/location.py Wed Jun 09 18:03:23 2021 +0200 @@ -64,10 +64,6 @@ 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 @@ 'lost_found': ['lost_found'], 'view': ['warehouse', 'view', 'storage'], 'storage': ['warehouse', 'view', 'storage'], - 'warehouse': [''], + 'warehouse': ['view'], } @classmethod