From 3fad70bdc506b8d68493277e15bc29fc876e369c Mon Sep 17 00:00:00 2001 From: ijas ahammed Date: Tue, 7 Sep 2021 06:10:33 +0000 Subject: [PATCH] [IMP] website_profile: set correct 'email_from' in validation email Currently, the 'email_from' field of the 'validation_email' mail template is utilizing logged in user's email address. However, in our case, logged in user is the same as one to which we are sending verification email. This creates the impression that you are sending the mail to yourself, which is not correct. With this commit, we now utilize the receiver's company email address 'email_formatted'. This compute field will first prioritize company's partner email address, and if not available, it will fallback to the catchall address of the company. If both are not available, we simply use logged in user's email as before. TaskID-2634155 closes odoo/odoo#76380 Signed-off-by: Thibault Delavallee (tde) --- addons/website_profile/data/mail_template_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_profile/data/mail_template_data.xml b/addons/website_profile/data/mail_template_data.xml index 13e46434b25..1e2ccd3eb15 100644 --- a/addons/website_profile/data/mail_template_data.xml +++ b/addons/website_profile/data/mail_template_data.xml @@ -7,7 +7,7 @@ Profile: Email Verification ${object.company_id.name} Profile validation - ${user.email_formatted | safe} + ${(object.company_id.email_formatted or object.email_formatted) |safe} ${object.email_formatted | safe}