diff options
Diffstat (limited to 'addons/web_graph/static/src/js/graph.js')
| -rw-r--r-- | addons/web_graph/static/src/js/graph.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js index 86c37b5508a..59bc2c29dcf 100644 --- a/addons/web_graph/static/src/js/graph.js +++ b/addons/web_graph/static/src/js/graph.js @@ -33,8 +33,20 @@ openerp.web_graph.GraphView = openerp.web.View.extend({ this.$element.hide(); }, start: function() { + var self = this; this._super(); - return this.rpc("/web_graph/graphview/load", {"model": this.model, "view_id": this.view_id}, this.on_loaded); + return $.when( + new openerp.web.DataSet(this, this.model).call('fields_get', []), + this.rpc('/web/view/load', { + model: this.model, + view_id: this.view_id, + view_type: 'graph' + })).then(function (fields_result, view_result) { + self.on_loaded({ + all_fields: fields_result[0], + fields_view: view_result[0] + }); + }); }, on_loaded: function(data) { this.all_fields = data.all_fields; |
