diff options
| author | Xavier Morel <xmo@openerp.com> | 2011-06-20 16:39:46 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2011-06-20 16:39:46 +0200 |
| commit | ec186dfb7d394a337744a70aab3b042feeddbbf8 (patch) | |
| tree | 0703410398ab65fb950b2ad577f9bb83f7354b2b /addons/base_graph/static | |
| parent | 2397a86d19ad4517b9cb70c2ab07f6348dfc2577 (diff) | |
[FIX] race condition between graph view loading and search request: View.start() should return a promise if it makes an async call, so caller (ViewManager in this case) knows when the graph view is ready for action
Also inherit from View
bzr revid: xmo@openerp.com-20110620143946-tv0qx84e0y06zxu7
Diffstat (limited to 'addons/base_graph/static')
| -rw-r--r-- | addons/base_graph/static/src/js/graph.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/base_graph/static/src/js/graph.js b/addons/base_graph/static/src/js/graph.js index d5c16f1cb90..4dec023b93f 100644 --- a/addons/base_graph/static/src/js/graph.js +++ b/addons/base_graph/static/src/js/graph.js @@ -14,7 +14,7 @@ var COLOR_PALETTE = [ QWeb.add_template('/base_graph/static/src/xml/base_graph.xml'); openerp.base.views.add('graph', 'openerp.base_graph.GraphView'); -openerp.base_graph.GraphView = openerp.base.Controller.extend({ +openerp.base_graph.GraphView = openerp.base.View.extend({ init: function(view_manager, session, element_id, dataset, view_id) { this._super(session, element_id); @@ -31,7 +31,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({ this.$element.hide(); }, start: function() { - this.rpc("/base_graph/graphview/load", {"model": this.model, "view_id": this.view_id}, this.on_loaded); + return this.rpc("/base_graph/graphview/load", {"model": this.model, "view_id": this.view_id}, this.on_loaded); }, on_loaded: function(data) { this.all_fields = data.all_fields; |
