diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-02-04 14:45:16 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-02-05 11:39:11 +0000 |
| commit | b6db6b878c5d329c19262d829e13726c3a3a1d25 (patch) | |
| tree | fd49fff13e186b91f88b287a99e114adaa8a406d /addons/website/static/src/js/widgets/ace.js | |
| parent | 99499589eafb9c05236eb47553c1d723573c1b70 (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/static/src/js/widgets/ace.js')
| -rw-r--r-- | addons/website/static/src/js/widgets/ace.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/website/static/src/js/widgets/ace.js b/addons/website/static/src/js/widgets/ace.js index d3fde57d033..15df55e0c71 100644 --- a/addons/website/static/src/js/widgets/ace.js +++ b/addons/website/static/src/js/widgets/ace.js @@ -2,7 +2,6 @@ odoo.define("website.ace", function (require) { "use strict"; var AceEditor = require('web_editor.ace'); -var weContext = require('website.context'); /** * Extends the default view editor so that the URL hash is updated with view ID @@ -45,7 +44,12 @@ var WebsiteAceEditor = AceEditor.extend({ // When saving a generic view, the view will be COW'd and // replace by the specific view after the reload. Thus the id in // URL won't exist anymore. We need to find the specific ID. - var context = weContext.get(); + var context; + this.trigger_up('context_get', { + callback: function (ctx) { + context = ctx; + }, + }); defs.push(this._rpc({ model: 'ir.ui.view', method: 'search_read', |
