[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.
This commit is contained in:
Richard Mathot 2017-04-24 10:18:37 +02:00
parent 814d903109
commit eefd0de541
No known key found for this signature in database
GPG Key ID: A7A432464AA3F482
2 changed files with 3 additions and 3 deletions

View File

@ -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">

View File

@ -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[