diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-03-05 09:34:56 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | e5740270568404d71a3bc093074a085c9c2eded8 (patch) | |
| tree | 7b84740d92c550236de25a37cf37d244760bdbf3 /addons/website_mail_channel | |
| parent | 0df9968433389e0d504276cd711473c2eef937ae (diff) | |
[REF] web,*: remove 'web.model' and 'web.dataModel
Use this.rpc instead of Model object, with web.ajax if necessary.
nb: EventDispatcherMixin include now the custom_events managment instead
of widget
Diffstat (limited to 'addons/website_mail_channel')
| -rw-r--r-- | addons/website_mail_channel/static/src/js/website_mail_channel.editor.js | 6 |
1 files changed, 3 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 9bd280cdde6..369f8787adb 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('web.Model'); +var model = require('website.model'); var base = require('web_editor.base'); var options = require('web_editor.snippets.options'); var website = require('website.website'); @@ -18,8 +18,8 @@ options.registry.subscribe = options.Class.extend({ window_title: _t("Add a Subscribe Button"), select: _t("Discussion List"), init: function (field) { - return new Model('mail.channel') - .call('name_search', ['', [['public','=','public']]], { context: base.get_context() }); + return model.performModelRPC('mail.channel', 'name_search', + ['', [['public','=','public']]], { context: base.get_context() }); }, }).then(function (mail_channel_id) { self.$target.attr("data-id", mail_channel_id); |
