Skip to content
Snippets Groups Projects
Commit bc81178d authored by abd-msyukyu-odoo's avatar abd-msyukyu-odoo
Browse files

[FIX] mass_mailing: keep body of invalid saved mailing


There was an issue when a mailing save failed: the edited body of the mailing
was lost.

Impacted versions:

  - 15.0 and higher

Steps to reproduce:

  1. Create a mailing "Start from scratch" and add some elements
  2. Do not fill in the subject (or at least one required field)
  3. Save (it should fail because of the empty required field)

Current behavior:

  - The edited template is lost

Expected behavior:

  - Keep the edited template even if the save failed

This commit fixes the problem by properly awaiting the promise _doAction so that
the field's value will be set correctly.

The testing tour `mass_mailing_editor_tour` is updated to check that the
body_arch is kept after a failed save.

This issue was introduced in 15.0 with:
95754eb6

Task-2856742

closes odoo/odoo#91677

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent d77d7e90
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment