diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2021-01-28 11:28:09 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2021-01-28 13:20:10 +0000 |
| commit | 256487ae9bc3701fa7b8e48490ab7d162736acbf (patch) | |
| tree | 75532671544885449a761fa58aa0170e7525f1ea /addons/web_editor/static/src/js | |
| parent | d66652b4aa514546356306e3eb48eaecaba07c33 (diff) | |
[FIX] mass_mailing: save error does not break inlining
Scenario:
- create mass mailing with icons and without title
- save and get error "The followign fields are invalid: Subject"
- fill subject and save
- edit
=> the icons have disappeared
This is because mass mailing widget is using:
- a "body_html" field that contains inlined html
- a wysiwyg editor to edit field "body_arch"
- a textarea containing "body_arch" value to be saved
When we save this happens:
1. we save the current value of wysiwyg into textarea
2. wysiwyg content is inlined (eg. transforming font in image)
3. inlined wysiwyg content is set to "body_html" field
4. if there:
- is no error while saving => body_html and body_arch are saved and
will be used on next edition
- if there is an error the fields are not saved, and we now have an
inlined content on wysiwyg, so next time we save the "body_arch" is
going to be inlined:
=> this for example breaking the icons on edition
Issue discovered when fixing opw-2447756
closes #65208
closes odoo/odoo#65217
X-original-commit: 0f5f53837bc403960e307ab85e9fe68423c23f5f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js')
0 files changed, 0 insertions, 0 deletions
