[FIX] web_editor: save zone with proper res_model
Without this commit, the method `saveModifiedImages` did not use editables zone but rather the whole `$editable`. Because of that, oeModel and oeId were undefined and saving images was done without the proper metadata. That made impossible the retrieval of the images from the method `ir.qweb.field.image` `from_html` defined by the module `web_unsplash`. task-2581567 closes odoo/odoo#77259 X-original-commit: c32ef686e9744fc66f372921fce5cfaff739a76c Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
committed by
Romain Derie
parent
017f738c5d
commit
a2cf13eec2
@@ -601,7 +601,8 @@ const Wysiwyg = Widget.extend({
|
||||
await this.snippetsMenu.cleanForSave();
|
||||
}
|
||||
|
||||
await this.saveModifiedImages();
|
||||
const editables = this.options.getContentEditableAreas();
|
||||
await this.saveModifiedImages(editables.length ? $(editables) : this.$editable);
|
||||
await this._saveViewBlocks();
|
||||
|
||||
this.trigger_up('edition_was_stopped');
|
||||
|
||||
Reference in New Issue
Block a user