[FIX] mass_mailing: duplicate call to saveModifiedImages

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) <sge@odoo.com>
Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) <rcdl@odoo.com>
This commit is contained in:
Rodolpho Lima
2024-02-01 07:06:55 +00:00
parent 69dc6d845a
commit 457686ceae
@@ -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();