diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-03-07 16:14:05 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 86a87aa8b0dde2237cfe1bb769724e8ed269b62e (patch) | |
| tree | 472de08242d81d1811c23dbfcd4381a903917d85 /addons/website_mail_channel/static | |
| parent | 78c97e6cc4c90036e68ad8f82b3c7d326b321067 (diff) | |
[REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
Diffstat (limited to 'addons/website_mail_channel/static')
| -rw-r--r-- | addons/website_mail_channel/static/src/js/website_mail_channel.editor.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/website_mail_channel/static/src/js/website_mail_channel.editor.js b/addons/website_mail_channel/static/src/js/website_mail_channel.editor.js index 369f8787adb..c15f30c223b 100644 --- a/addons/website_mail_channel/static/src/js/website_mail_channel.editor.js +++ b/addons/website_mail_channel/static/src/js/website_mail_channel.editor.js @@ -2,7 +2,7 @@ odoo.define('website_mail_channel.editor', function (require) { 'use strict'; var core = require('web.core'); -var model = require('website.model'); +var rpc = require('web.rpc'); var base = require('web_editor.base'); var options = require('web_editor.snippets.options'); var website = require('website.website'); @@ -18,8 +18,10 @@ options.registry.subscribe = options.Class.extend({ window_title: _t("Add a Subscribe Button"), select: _t("Discussion List"), init: function (field) { - return model.performModelRPC('mail.channel', 'name_search', - ['', [['public','=','public']]], { context: base.get_context() }); + return rpc.query({model: 'mail.channel', method: 'name_search'}) + .args(['', [['public','=','public']]]) + .withContext(base.get_context()) + .exec({type: "ajax"}); }, }).then(function (mail_channel_id) { self.$target.attr("data-id", mail_channel_id); |
