Skip to content
Snippets Groups Projects
Commit 3e12f2ff authored by Nans Lefebvre's avatar Nans Lefebvre
Browse files

[FIX] mail: fix mail template onchange


The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.

We clean up after c6d718f2 and subsequently 516f22c3 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f2.
To keep the second behaviour, we thus need to add a (5,) command.

opw 2003197

closes odoo/odoo#33706

Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
parent 69b18768
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