Skip to content
Snippets Groups Projects
Unverified Commit eefd0de5 authored by Richard Mathot's avatar Richard Mathot
Browse files

[FIX] safer company name as email sender

In some email templates of Odoo, the From: field is generated from the
company name. If this name contains an "&" character, this will lead in
an escaping eg; &

Sender header will look like:
From: Machin &amp; Brol <machinbrol@toto.com>

This case is not well handled by email providers like Gmail, that
splits the line on the ";" and considers there are 2 senders, and then
discards the email.

We then fix the templates, waiting for a better fix in master.
parent 814d9031
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@
<record id="reset_password_email" model="email.template">
<field name="name">Reset Password</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_from"><![CDATA["${object.company_id.name|safe}" <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_to">${object.email|safe}</field>
<field name="subject">Password reset</field>
<field name="body_html"><![CDATA[
......@@ -37,7 +37,7 @@
<record id="set_password_email" model="email.template">
<field name="name">Odoo Enterprise Connection</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_from"><![CDATA["${object.company_id.name|safe}" <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_to">${object.email|safe}</field>
<field name="subject"><![CDATA[${object.company_id.name} invitation to connect on Odoo]]></field>
<field name="body_html">
......
......@@ -106,7 +106,7 @@
<record id="validation_email" model="email.template">
<field name="name">Email Verification</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_from"><![CDATA["${object.company_id.name|safe}" <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_to">${object.email|safe}</field>
<field name="subject"><![CDATA[${object.company_id.name} Forums validation]]></field>
<field name="body_html"><![CDATA[
......
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