changeset c9feb4395bf0 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=c9feb4395bf0
description:
        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
diffstat:

 trytond/model/modelview.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 40b2c006129b -r c9feb4395bf0 trytond/model/modelview.py
--- a/trytond/model/modelview.py        Sat Mar 28 00:28:43 2020 +0100
+++ b/trytond/model/modelview.py        Sat Mar 28 00:33:27 2020 +0100
@@ -463,7 +463,7 @@
             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__),

Reply via email to