summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/mixins.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-03-07 16:13:43 +0100
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit78c97e6cc4c90036e68ad8f82b3c7d326b321067 (patch)
tree64790a456353a914b02102d7f5e6d0bb0ab35726 /addons/web/static/src/js/core/mixins.js
parent1ec265eb92ebec9b22d471459af442572d187821 (diff)
[IMP] web: remove perform(Model)RPC
and replace them with a new, private, _rpc method. Also, extends the rpc builder to be able to send arbitrary parameters.
Diffstat (limited to 'addons/web/static/src/js/core/mixins.js')
-rw-r--r--addons/web/static/src/js/core/mixins.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/addons/web/static/src/js/core/mixins.js b/addons/web/static/src/js/core/mixins.js
index 08090ddcc33..71ce5e28f7f 100644
--- a/addons/web/static/src/js/core/mixins.js
+++ b/addons/web/static/src/js/core/mixins.js
@@ -453,7 +453,7 @@ var ServicesMixin = {
* @param {string} method if a model is given, this argument is a method
* @returns {RPCBuilder}
*/
- rpc: function (arg1, method) {
+ _rpc: function (arg1, method) {
return rpc.query({
method: method,
model: method && arg1,
@@ -461,18 +461,6 @@ var ServicesMixin = {
route: !method && arg1,
});
},
- // AJAX calls
- performRPC: function (route, args, options) {
- return this.call('ajax', 'rpc', route, args || {}, options || {});
- },
- performModelRPC: function (model, method, args, kwargs, options) {
- return this.performRPC('/web/dataset/call_kw/' + model + '/' + method, {
- model: model,
- method: method,
- args: args || [],
- kwargs: kwargs || {},
- }, options || {});
- },
loadFieldView: function (dataset, view_id, view_type, options) {
return this.loadViews(dataset.model, dataset.get_context(), [[view_id, view_type]], options).then(function (result) {
return result[view_type];