From 760ae910d46f36957e61353290f6edc58b29c5da Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Thu, 14 Nov 2019 13:34:22 +0000 Subject: [PATCH] [FIX] web_editor: restore debug assets in iframe Open Mass Mailing in debug mode, create a new mass mailing, choose a template for the body, check with the inspector the iframe. The head of the iframe does not have the debug assets. This is because the global variable relative to the debug mode gets temporary overwritten before solving the promise. For Gorash this has been done for: * Performance as all the editor assets must be inserted into the iframe assets * As an indication to bugfixers that the fix must not be done in this bundle as it is the exact same content as outside of the iframe and the exact same content as previous Odoo versions. Removing the override given that: * If someone enable debug=assets he/she is aware of the performance hit * A ticket has been opened because the iframe is hard to debug without debug assets. opw-2117649 closes odoo/odoo#40417 X-original-commit: 17c6952af3242c22bae2596f64b0addd04b9f9e0 Signed-off-by: Nicolas Martinelli (nim) --- addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js index 6757797c82c..1c2af6697d7 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js @@ -36,8 +36,6 @@ Wysiwyg.include({ if (!this.options.inIframe) { return this._super(); } - var debug = odoo.debug; - odoo.debug = false; var defAsset; if (this.options.iframeCssAssets) { @@ -50,8 +48,6 @@ Wysiwyg.include({ } promiseWysiwyg = promiseWysiwyg || ajax.loadAsset('web_editor.wysiwyg_iframe_editor_assets'); - odoo.debug = debug; - this.defAsset = Promise.all([promiseWysiwyg, defAsset]); this.$target = this.$el;