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
This commit is contained in:
Cédric Krier
2020-03-28 00:33:27 +01:00
parent 8df56316b8
commit 7691b89822
+1 -1
View File
@@ -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__),