diff options
| author | Gery Debongnie <ged@openerp.com> | 2014-02-10 12:23:13 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2014-02-10 12:23:13 +0100 |
| commit | 9eda870d2b8bad1d2c480a9a54eb7264ce4df183 (patch) | |
| tree | 970fb2434c26602b7b39d62298855ea70db09ae5 /addons/web_graph/static/src | |
| parent | ff89abba855a2348aec2bd00714bf5adda2565fe (diff) | |
[FIX] fixes a bug caused by two consecutive calls to do_search, with incomplete informations in the first call. These calls then triggered useless queries and caused an incorrect (but brief) display of partial information in graph view (addon web_graph)
bzr revid: ged@openerp.com-20140210112313-z9elwhmjil41jcd2
Diffstat (limited to 'addons/web_graph/static/src')
| -rw-r--r-- | addons/web_graph/static/src/js/graph_view.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js index b39ac105ee4..33b99b88bcf 100644 --- a/addons/web_graph/static/src/js/graph_view.js +++ b/addons/web_graph/static/src/js/graph_view.js @@ -77,6 +77,11 @@ instance.web_graph.GraphView = instance.web.View.extend({ }, do_search: function (domain, context, group_by) { + if (this.ignore_do_search) { + this.ignore_do_search = false; + return; + } + var self = this, col_group_by = this.extract_groupby('col_group_by', context) || []; @@ -131,6 +136,14 @@ instance.web_graph.GraphView = instance.web.View.extend({ if (!_.has(this.search_view, '_s_groupby')) { return; } + if (row_groupby.length && col_groupby.length) { + // when two changes to the search view will be done, the method do_search + // will be called twice, once with the correct groupby and incorrect col_groupby, + // and once with correct informations. This flag is necessary to prevent the + // incorrect informations to propagate and trigger useless queries + this.ignore_do_search = true; + } + // add row groupbys var row_facet = this.make_row_groupby_facets(row_groupby), row_search_facet = query.findWhere({category:'GroupBy'}); |
