From 6850d61e4070ea77feda551ff7972ba52c9f737a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 3 Oct 2015 00:35:09 +0200 Subject: [PATCH] Fix timestamp in save_tree_state tree_states should always have the timestamp and it must come from the parent. --- src/screen.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screen.js b/src/screen.js index 2f7ef74ad3..f54a1c2061 100644 --- a/src/screen.js +++ b/src/screen.js @@ -1376,6 +1376,8 @@ store = (store === undefined) ? true : store; var i, len, view, widgets, wi, wlen; var parent_ = this.group.parent ? this.group.parent.id : null; + var timestamp = this.group.parent ? + this.group.parent._timestamp : null; for (i = 0, len = this.views.length; i < len; i++) { view = this.views[i]; if (view.view_type == 'form') { @@ -1397,11 +1399,9 @@ } this.tree_states[parent_][ view.children_field || null] = [ - [], [[this.current_record.id]]]; + timestamp, [], [[this.current_record.id]]]; } } else if (view.view_type == 'tree') { - parent_ = this.group.parent ? this.group.parent.id : null; - var timestamp = this.parent ? this._timestamp : null; var paths = view.get_expanded_paths(); var selected_paths = view.get_selected_paths(); if (!(parent_ in this.tree_states)) {