summaryrefslogtreecommitdiff
path: root/addons/website_mail_channel/static
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-02-04 14:45:16 +0000
committerqsm-odoo <qsm@odoo.com>2019-02-05 11:39:11 +0000
commitb6db6b878c5d329c19262d829e13726c3a3a1d25 (patch)
treefd49fff13e186b91f88b287a99e114adaa8a406d /addons/website_mail_channel/static
parent99499589eafb9c05236eb47553c1d723573c1b70 (diff)
[REF] website, *: remove 'website.context' module
* website_forum, website_gengo, website_mail_channel, website_sale Retrieving the global context is now the root's job, this will prevent problems when trying to extend the values the context has. See upcoming improvements with https://github.com/odoo/odoo/pull/29442 closes odoo/odoo#30816
Diffstat (limited to 'addons/website_mail_channel/static')
-rw-r--r--addons/website_mail_channel/static/src/js/website_mail_channel.editor.js13
1 files changed, 5 insertions, 8 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 dfa25fe06e8..622451f2857 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,8 +2,6 @@ odoo.define('website_mail_channel.editor', function (require) {
'use strict';
var core = require('web.core');
-var rpc = require('web.rpc');
-var wContext = require('website.context');
var options = require('web_editor.snippets.options');
var wUtils = require('website.utils');
@@ -17,12 +15,11 @@ options.registry.subscribe = options.Class.extend({
window_title: _t("Add a Subscribe Button"),
select: _t("Discussion List"),
init: function (field) {
- return rpc.query({
- model: 'mail.channel',
- method: 'name_search',
- args: ['', [['public','=','public']]],
- context: wContext.get(), // TODO use this._rpc
- });
+ return self._rpc({
+ model: 'mail.channel',
+ method: 'name_search',
+ args: ['', [['public', '=', 'public']]],
+ });
},
}).then(function (mail_channel_id) {
self.$target.attr("data-id", mail_channel_id);