Skip to content

Commit

Permalink
fix: solve usererror when sending birthday gift com
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément committed Sep 6, 2024
1 parent 5983f0b commit 0f8cc6e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions partner_communication/wizards/mail_compose_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,12 @@ def _get_mail_values(self, template, res_ids):
write_data = wizard.onchange_template_id(
template.id, "mass_mail", False, False
)["value"]
values = wizard.get_mail_values(res_ids)

# Body would be sanitized if we write it now, breaking any embedded code and
# causing an error.
# Only usage is create_emails above and it overrides it just after.
del write_data["body"]

wizard.write(write_data)

return values
return wizard.get_mail_values(res_ids)

0 comments on commit 0f8cc6e

Please sign in to comment.