Skip to content
Snippets Groups Projects
Commit d8deacfd authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[FIX] mail: set email_from in composer only if set


Some functional flows use sudo() to create records as current user is the
public user. This user has no email. Since 1e6c3bec using sudo does
not take superuser identity completely as it only bypasses access rights.
It means some messages are created with public user as author, meaning no
email_from.

In this commit we fix some functional flows by setting a default email_from
in the message composer only if a real email is found. Otherwise it will have
to be set either by the template, either later in the process when creating
messages or emails.

closes odoo/odoo#34742

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 715834c6
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment