summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-09-26 16:02:41 +0200
committerXavier Morel <xmo@openerp.com>2011-09-26 16:02:41 +0200
commit0a3a7663d1562ca3649c87cbc2abea0c9b7334ca (patch)
treee3e40509ef04ede8c467364dcb082d2c9d9df201 /addons/web_graph/static/src
parent211713396a77201663718eaee3d3ee6ef7805692 (diff)
[IMP] remove custom implementation of fields_view_get in graph view
bzr revid: xmo@openerp.com-20110926140241-4xuobnvpncetk7bx
Diffstat (limited to 'addons/web_graph/static/src')
-rw-r--r--addons/web_graph/static/src/js/graph.js14
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;