[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) <nim@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2019-11-18 11:49:11 +00:00
committed by fw-bot
parent eae9055f49
commit 760ae910d4
@@ -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;