summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js/pivot_table.js
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2014-01-15 10:37:49 +0100
committerGery Debongnie <ged@openerp.com>2014-01-15 10:37:49 +0100
commitcf81efda4309f895f6777c46c39f1fe894f109cf (patch)
tree879242b0c1a0b99865307f0ae094204c021bc49b /addons/web_graph/static/src/js/pivot_table.js
parentb681cff77f8232d5d67f065daf278a17c3f98107 (diff)
[IMP] adds search view integration in graph view (addon web_graph)
bzr revid: ged@openerp.com-20140115093749-t2s0306fchm2tnir
Diffstat (limited to 'addons/web_graph/static/src/js/pivot_table.js')
-rw-r--r--addons/web_graph/static/src/js/pivot_table.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js
index 9c927150f20..edd1fc68042 100644
--- a/addons/web_graph/static/src/js/pivot_table.js
+++ b/addons/web_graph/static/src/js/pivot_table.js
@@ -77,18 +77,20 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend(openerp.EventDispatcherM
var row_gbs = this.create_field_values(row_groupby),
col_gbs = this.create_field_values(col_groupby),
dom_changed = !_.isEqual(this.domain, domain),
- gb_changed = !(_.isEqual(row_gbs, this.rows.groupby) &&
- _.isEqual(col_gbs, this.cols.groupby));
+ row_gb_changed = !_.isEqual(row_gbs, this.rows.groupby),
+ col_gb_changed = !_.isEqual(col_gbs, this.cols.groupby);
if (dom_changed) {
this.domain = domain;
}
- if (gb_changed) {
+ if (row_gb_changed || col_gb_changed) {
this.cols.groupby = col_gbs;
this.rows.groupby = row_gbs;
+ if (row_gb_changed) {this.rows.headers = null; }
+ if (col_gb_changed) {this.cols.headers = null; }
if (this.active) { this.trigger('groupby_changed'); }
}
- if (this.active && (gb_changed || dom_changed)) {
+ if (this.active && (row_gb_changed || col_gb_changed || dom_changed)) {
this.update_data();
}
},