summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph_view.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2016-03-16 13:55:42 +0100
committerAaron Bohy <aab@odoo.com>2016-03-18 10:44:52 +0100
commit6c57935443d2abd4e3c7507cf4f3093719fb1c2f (patch)
tree88971120ba2505ac90cc8428d57312742e2313bd /addons/web/static/src/js/views/graph_view.js
parentbda451ab31c19c52eb72c16eae2471d39860a8d3 (diff)
[IMP] openerp,web: cache of actions, fields(_views) and filters
Introduction of 'data_manager' service which handles meta-data related to actions and views (fields_views, fields and filters). Ideally, all RPCs to get that kind of information should go through data_manager, as it holds an internal cache.
Diffstat (limited to 'addons/web/static/src/js/views/graph_view.js')
-rw-r--r--addons/web/static/src/js/views/graph_view.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/graph_view.js b/addons/web/static/src/js/views/graph_view.js
index 1df6cd14063..193f07c6d2d 100644
--- a/addons/web/static/src/js/views/graph_view.js
+++ b/addons/web/static/src/js/views/graph_view.js
@@ -5,6 +5,7 @@ odoo.define('web.GraphView', function (require) {
*---------------------------------------------------------*/
var core = require('web.core');
+var data_manager = require('web.data_manager');
var GraphWidget = require('web.GraphWidget');
var View = require('web.View');
@@ -28,7 +29,7 @@ var GraphView = View.extend({
},
willStart: function () {
var self = this;
- var load_fields = this.ViewManager.get_fields().then(this.prepare_fields.bind(this));
+ var fields_def = data_manager.load_fields(this.dataset).then(this.prepare_fields.bind(this));
this.fields_view.arch.children.forEach(function (field) {
var name = field.attrs.name;
if (field.attrs.interval) {
@@ -40,7 +41,7 @@ var GraphView = View.extend({
self.initial_groupbys.push(name);
}
});
- return $.when(this._super(), load_fields);
+ return $.when(this._super(), fields_def);
},
/**
* Render the buttons according to the GraphView.buttons and