From 457686ceae5855eb1534e15bc3c47cf175222054 Mon Sep 17 00:00:00 2001 From: Rodolpho Lima Date: Thu, 12 Oct 2023 15:01:53 +0200 Subject: [PATCH] [FIX] mass_mailing: duplicate call to saveModifiedImages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'saveModifiedImages' function is already called by the parent class' (HtmlField) 'commitChanges', in which the replacement of the images' src attribute and the removal of the 'o_modified_image_to_save' class are done with the editor's observer deactivated. Before this commit, calling this function before the call to super.commitChanges resulted in converting the images within a history step that was later reverted by the 'historyRevertCurrentStep()' call at the end of the '_pendingCommitChanges' function. Morover, the '$content' property is undefined. closes odoo/odoo#152065 X-original-commit: 622ca94b958444ae2279f13871c6a05942fdaf0e Signed-off-by: Geelen Sébastien (sge) Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) --- addons/mass_mailing/static/src/js/mass_mailing_html_field.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_html_field.js b/addons/mass_mailing/static/src/js/mass_mailing_html_field.js index 6ca2d59d784..b71b8dc753f 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_html_field.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_html_field.js @@ -114,7 +114,6 @@ export class MassMailingHtmlField extends HtmlField { const $editable = this.wysiwyg.getEditable(); this.wysiwyg.odooEditor.historyPauseSteps(); await this.wysiwyg.cleanForSave(); - await this.wysiwyg.savePendingImages(this.$content); await super.commitChanges();