[IMP] optimizes graph view to avoid reloading data in some cases (such as removing a filter from the search view) (addon web_graph)

bzr revid: ged@openerp.com-20140225104233-zidrw03dh2hlwrng
This commit is contained in:
Gery Debongnie 2014-02-25 11:42:33 +01:00
parent 02b70e2950
commit fed81544ad
1 changed files with 7 additions and 0 deletions

View File

@ -154,6 +154,13 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
return;
}
if (!dom_changed && col_reduced && row_reduced) {
this.pivot.fold_with_depth(this.pivot.rows, row_gbs.length);
this.pivot.fold_with_depth(this.pivot.cols, col_gbs.length);
this.display_data();
return;
}
if (dom_changed || row_gb_changed || col_gb_changed) {
this.pivot.set(domain, row_gbs, col_gbs).then(this.proxy('display_data'));
}