From 5c6818eecfe03bc9184a7b6a918bb84d9bd3179c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Mon, 6 Mar 2017 15:05:25 +0100 Subject: [PATCH] [REF] *: remove calls to old rpc methods the performModelRPC methos has been deprecated, this commit replaces all call to that method by calls to the new _rpc method. --- static/src/js/website_form_editor.js | 6 +++--- static/src/js/website_form_editor_tour.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/src/js/website_form_editor.js b/static/src/js/website_form_editor.js index 3e388b02bf2..37a4446d26b 100644 --- a/static/src/js/website_form_editor.js +++ b/static/src/js/website_form_editor.js @@ -64,7 +64,7 @@ odoo.define('website_form_editor', function (require) { rpc.query({model: "ir.model", method: "get_authorized_fields"}) .args([this.$target.closest('form').attr('data-model_name')]) .withContext(base.get_context()) - .exec({callback: ajax.rpc.bind(ajax)}) + .exec({type: "ajax"}) .then(function(fields) { // The get_fields function doesn't return the name // in the field dict since it uses it has the key @@ -90,7 +90,7 @@ odoo.define('website_form_editor', function (require) { ['id', 'model', 'name', 'website_form_label'] ]) .withContext(base.get_context()) - .exec({callback: ajax.rpc.bind(ajax)}) + .exec({type: "ajax"}) .then(function(models) { // Models selection input var model_selection = qweb.render("website_form_editor.field_many2one", { @@ -344,7 +344,7 @@ odoo.define('website_form_editor', function (require) { // succeeds... but no idea how to do that rpc.query({model: 'ir.model.fields', method: 'formbuilder_whitelist'}) .args([model, _.uniq(fields)]) - .exec({callback: ajax.rpc.bind(ajax)}); + .exec({type: "ajax"}); } } diff --git a/static/src/js/website_form_editor_tour.js b/static/src/js/website_form_editor_tour.js index 54a2ac00738..0e3d48acd2e 100644 --- a/static/src/js/website_form_editor_tour.js +++ b/static/src/js/website_form_editor_tour.js @@ -616,7 +616,7 @@ odoo.define('website_form_editor.tour', function(require) { ], [] ]) - .exec({callback: ajax.rpc.bind(ajax)}); + .exec({type: "ajax"}); var success = function(model, data) { if(data.length) { $('body').append('
');