diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-09-28 14:50:18 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-09-30 19:55:17 +0200 |
| commit | 55131b8f5becdd3d4776f4c3e7e4288a0b185706 (patch) | |
| tree | 4eca54d0cd14a2180227ad2b155e3380d37fb9a6 /addons/website/static/src/js/widgets/theme.js | |
| parent | feae553b98c88282695c77382f4a52c78b3f8f70 (diff) | |
[REF] website, *: add automatic context for call_kw rpc
* web_editor, website_blog, website_crm_partner_assign, website_links,
website_livechat, website_mail_channel, website_mass_mailing,
website_slides
Calling a model's method thanks to an RPC will now always send the
web_editor context automatically, making sure the method gets the
website_id all the time, removing the need to guess the current website
(now the get_current_website method uses the context website_id if any).
Note: other routes already have the website_id via request.env.context
if they correctly set website=True (this commit also adds website=True
for scss files customization routes).
Diffstat (limited to 'addons/website/static/src/js/widgets/theme.js')
| -rw-r--r-- | addons/website/static/src/js/widgets/theme.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/website/static/src/js/widgets/theme.js b/addons/website/static/src/js/widgets/theme.js index 416f9eaba8d..a98f9194101 100644 --- a/addons/website/static/src/js/widgets/theme.js +++ b/addons/website/static/src/js/widgets/theme.js @@ -5,7 +5,6 @@ var config = require('web.config'); var core = require('web.core'); var ColorpickerDialog = require('web.colorpicker'); var Dialog = require('web.Dialog'); -var weContext = require('web_editor.context'); var widgets = require('web_editor.widget'); var websiteNavbarData = require('website.navbar'); @@ -44,7 +43,7 @@ var ThemeCustomizeDialog = Dialog.extend({ templateDef = this._rpc({ model: 'ir.ui.view', method: 'read_template', - args: ['website.theme_customize', weContext.get()], + args: ['website.theme_customize'], }).then(function (data) { return core.qweb.add_template(data); }); @@ -313,7 +312,6 @@ var ThemeCustomizeDialog = Dialog.extend({ data[1], '#wrapwrap { background-image: url("' + src + '"); }', '//style', - weContext.get(), ], }); }).then(function () { |
