From b6db6b878c5d329c19262d829e13726c3a3a1d25 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 4 Feb 2019 14:45:16 +0000 Subject: [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 --- .../static/src/js/website_mail_channel.editor.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'addons/website_mail_channel/static') 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); -- cgit v1.2.3