From 91c3b1c0d7363a1cbc8ca8e895e6fc008ca25e38 Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Tue, 7 Apr 2020 10:06:14 +0000 Subject: [FIX] website_mass_mailing: fix traceback when saving with popup open When the newsletter popup was introduced, the modal was for some reason marked with the o_editable class, which is normally used to let the editor know which elements in the page can be edited and saved in the database. Because of this, upon saving with the modal in the page (ie, if the modal is open when saving) it would try to destroy the editor associated with the modal, which doesn't exist, resulting in a traceback. This commit fixes that by removing the o_editable class from the modal, this doesn't actually prevent edition, because the modal is already inside of an editable segment of the page. task-2092593 closes odoo/odoo#50080 X-original-commit: 856d21cef530a9393bcebbf314a9316934ffb7c7 Signed-off-by: Quentin Smetz (qsm) --- addons/website_mass_mailing/static/src/js/website_mass_mailing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/website_mass_mailing/static/src') diff --git a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js index 22a739a98e9..1ea942ddc76 100644 --- a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js +++ b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js @@ -167,7 +167,7 @@ publicWidget.registry.newsletter_popup = publicWidget.Widget.extend({ $content: $('
').html(content), $parentNode: this.$target, backdrop: !this.editableMode, - dialogClass: 'p-0' + (this.editableMode ? ' o_editable oe_structure oe_empty' : ''), + dialogClass: 'p-0' + (this.editableMode ? ' oe_structure oe_empty' : ''), renderFooter: false, size: 'medium', }); -- cgit v1.2.3