From 7691b89822dc0b2b58fdf54d31397e8d4fb23b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 28 Mar 2020 00:33:27 +0100 Subject: [PATCH] Set saved tree width only if client save them We rename also the option from save_width_height to save_tree_width which correspond better to the current behavior. issue9130 review258921051 --- trytond/model/modelview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/model/modelview.py b/trytond/model/modelview.py index fe2f26c6a6..dbeb9bef7a 100644 --- a/trytond/model/modelview.py +++ b/trytond/model/modelview.py @@ -463,7 +463,7 @@ class ModelView(Model): for page in tree.xpath('//page[not(descendant::*)]'): page.getparent().remove(page) - if type == 'tree': + if type == 'tree' and Transaction().context.get('view_tree_width'): ViewTreeWidth = pool.get('ir.ui.view_tree_width') viewtreewidth_ids = ViewTreeWidth.search([ ('model', '=', cls.__name__),