From 049a0edbbabd25daa8ca477c328a452dc09aadf0 Mon Sep 17 00:00:00 2001 From: Rodolpho Lima Date: Thu, 5 Oct 2023 18:00:41 +0200 Subject: [PATCH] [FIX] web_editor: dependency errors in iframe bundle Before this commit, some assets of the "web_editor.wysiwyg_iframe_editor_assets" bundle could not be loaded because of unmet dependencies. The loading of such modules failed silently because the module loader waits for the "DOMContentLoaded" event in order to replace the DOM's content by the error report, and such event is not triggered by the wysiwyg's iframe. This commit removes unnecessary assets from the mentioned bundle and solves the dependency errors. closes odoo/odoo#141591 Signed-off-by: Nicolas Bayet (nby) Co-authored-by: Nicolas Bayet --- addons/web_editor/__manifest__.py | 43 +++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/addons/web_editor/__manifest__.py b/addons/web_editor/__manifest__.py index c55e7897a69..e116b99463f 100644 --- a/addons/web_editor/__manifest__.py +++ b/addons/web_editor/__manifest__.py @@ -48,8 +48,6 @@ Odoo Web Editor widget. 'web/static/src/module_loader.js', 'web/static/src/session.js', - - 'web/static/lib/luxon/luxon.js', 'web/static/lib/owl/owl.js', 'web/static/lib/owl/odoo_module.js', 'web/static/lib/jquery/jquery.js', @@ -74,15 +72,38 @@ Odoo Web Editor widget. 'web/static/lib/select2/select2.js', 'web/static/src/legacy/js/libs/bootstrap.js', 'web/static/src/legacy/js/libs/jquery.js', - 'web/static/src/legacy/js/core/class.js', - 'web/static/src/legacy/js/core/dialog.js', - 'web/static/src/legacy/xml/dialog.xml', - 'web/static/src/legacy/js/core/dom.js', - 'web/static/src/legacy/js/core/mixins.js', - 'web/static/src/legacy/js/core/service_mixins.js', - 'web/static/src/legacy/js/core/widget.js', - ('include', 'web_editor.assets_wysiwyg'), - ('include', 'web_editor.assets_legacy_wysiwyg'), + 'web/static/src/core/registry.js', + + # odoo-editor + 'web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js', + 'web_editor/static/src/js/editor/odoo-editor/src/utils/constants.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/align.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/commands.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/deleteBackward.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/deleteForward.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/enter.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/shiftEnter.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/shiftTab.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/tab.js', + 'web_editor/static/src/js/editor/odoo-editor/src/commands/toggleList.js', + + # odoo utils + 'web_editor/static/src/scss/bootstrap_overridden.scss', + 'web/static/src/scss/pre_variables.scss', + 'web/static/lib/bootstrap/scss/_variables.scss', + 'web_editor/static/src/js/editor/odoo-editor/src/style.scss', + + # integration + 'web_editor/static/src/scss/wysiwyg.scss', + 'web_editor/static/src/scss/wysiwyg_iframe.scss', + 'web_editor/static/src/scss/wysiwyg_snippets.scss', + + 'web_editor/static/src/xml/editor.xml', + 'web_editor/static/src/xml/commands.xml', + 'web_editor/static/src/xml/grid_layout.xml', + 'web_editor/static/src/xml/snippets.xml', + 'web_editor/static/src/xml/wysiwyg.xml', + 'web_editor/static/src/xml/wysiwyg_colorpicker.xml', ], 'web_editor.assets_media_dialog': [ 'web_editor/static/src/components/**/*',