diff options
| author | Gery Debongnie <ged@openerp.com> | 2014-01-17 17:19:40 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2014-01-17 17:19:40 +0100 |
| commit | ba9999c28aa0e821924e5792a672eb429467ab6c (patch) | |
| tree | 5905fab5d55b8a12a1cf174d9d14f7e36cc2e5c2 /addons/web_graph/static/src/js/graph_widget.js | |
| parent | 5aade330c20a1021eaa31bf932dab81dd45ec431 (diff) | |
[FIX] fix crash happening when user goes to graph view, switch to other view, changes groupby and goes back to graph view. (addon web_graph)
bzr revid: ged@openerp.com-20140117161940-3ojz17luxtsb9qfa
Diffstat (limited to 'addons/web_graph/static/src/js/graph_widget.js')
| -rw-r--r-- | addons/web_graph/static/src/js/graph_widget.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js index d774b66727e..1dc4510c5b6 100644 --- a/addons/web_graph/static/src/js/graph_widget.js +++ b/addons/web_graph/static/src/js/graph_widget.js @@ -62,6 +62,7 @@ openerp.web_graph.Graph = openerp.web.Widget.extend(openerp.EventDispatcherMixin }); self.pivot.activate(); self.put_measure_checkmarks(); + self.trigger('groupby_changed'); }); }, @@ -150,15 +151,15 @@ openerp.web_graph.Graph = openerp.web.Widget.extend(openerp.EventDispatcherMixin // returns the row groupbys as a list of fields (not the representation used // internally by pivot table) get_row_groupby: function () { - return this.pivot.rows.groupby; + return (this.pivot) ? this.pivot.rows.groupby : this.pivot_options.row_groupby; }, get_col_groupby: function () { - return this.pivot.cols.groupby; + return (this.pivot) ? this.pivot.cols.groupby : this.pivot_options.col_groupby; }, - reload: function () { - this.pivot.update_data(); + get_domain: function () { + return (this.pivot) ? this.pivot.domain : this.pivot_options.domain; }, // ---------------------------------------------------------------------- |
