diff options
| author | qdc <qdc@openerp.com> | 2014-08-21 09:03:12 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-08-21 11:09:49 +0200 |
| commit | 8307a5f6ed54bd69ada4250e0c3170552bf210de (patch) | |
| tree | 91aa2fd5ad1c8a99d885292e0acf0bbb740dbefc /addons/web_graph/static/src/js/pivot_table.js | |
| parent | 4c6dcd7fcb9a0463003c3820eb9a35dfb7af14b3 (diff) | |
[IMP] Graph views: show always measure + filters record measures in context
Diffstat (limited to 'addons/web_graph/static/src/js/pivot_table.js')
| -rw-r--r-- | addons/web_graph/static/src/js/pivot_table.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/addons/web_graph/static/src/js/pivot_table.js b/addons/web_graph/static/src/js/pivot_table.js index b842b00f00d..b66bc41e98c 100644 --- a/addons/web_graph/static/src/js/pivot_table.js +++ b/addons/web_graph/static/src/js/pivot_table.js @@ -55,23 +55,27 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({ } }, - set: function (domain, row_groupby, col_groupby) { + set: function (domain, row_groupby, col_groupby, measures_groupby) { var self = this; if (this.updating) { return this.updating.then(function () { self.updating = false; - return self.set(domain, row_groupby,col_groupby); + return self.set(domain, row_groupby, col_groupby, measures_groupby); }); } var row_gb_changed = !_.isEqual(row_groupby, this.rows.groupby), - col_gb_changed = !_.isEqual(col_groupby, this.cols.groupby); + col_gb_changed = !_.isEqual(col_groupby, this.cols.groupby), + measures_gb_changed = !_.isEqual(measures_groupby, this.measures); this.domain = domain; this.rows.groupby = row_groupby; this.cols.groupby = col_groupby; + if (measures_groupby.length) { this.measures = measures_groupby; } + if (row_gb_changed) { this.rows.headers = null; } if (col_gb_changed) { this.cols.headers = null; } + if (measures_gb_changed && measures_groupby.length) { this.set_measures(measures_groupby); } return this.update_data(); }, @@ -460,5 +464,3 @@ openerp.web_graph.PivotTable = openerp.web.Class.extend({ }); })(); - - |
