diff options
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', |
