diff options
| author | Aaron Bohy <aab@odoo.com> | 2016-03-16 13:55:42 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2016-03-18 10:44:52 +0100 |
| commit | 6c57935443d2abd4e3c7507cf4f3093719fb1c2f (patch) | |
| tree | 88971120ba2505ac90cc8428d57312742e2313bd /addons/web/static/src/js/framework/view.js | |
| parent | bda451ab31c19c52eb72c16eae2471d39860a8d3 (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/framework/view.js')
| -rw-r--r-- | addons/web/static/src/js/framework/view.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web/static/src/js/framework/view.js b/addons/web/static/src/js/framework/view.js index b6153475b0b..fbbede916e5 100644 --- a/addons/web/static/src/js/framework/view.js +++ b/addons/web/static/src/js/framework/view.js @@ -3,6 +3,7 @@ odoo.define('web.View', function (require) { var core = require('web.core'); var data = require('web.data'); +var data_manager = require('web.data_manager'); var pyeval = require('web.pyeval'); var Widget = require('web.Widget'); @@ -122,10 +123,11 @@ var View = Widget.extend({ core.bus.trigger('do_reload_needaction'); }); } else if (action_data.type=="action") { - return this.rpc('/web/action/load', { - action_id: action_data.name, - context: _.extend(pyeval.eval('context', context), {'active_model': dataset.model, 'active_ids': dataset.ids, 'active_id': record_id}), - }).then(handler); + return data_manager.load_action(action_data.name, _.extend(pyeval.eval('context', context), { + active_model: dataset.model, + active_ids: dataset.ids, + active_id: record_id + })).then(handler); } else { return dataset.exec_workflow(record_id, action_data.name).then(handler); } |
