Skip to content
Snippets Groups Projects
Commit e05b2d01 authored by Lucas Perais (lpe)'s avatar Lucas Perais (lpe)
Browse files

[FIX] hr_recruitment: email from in template should be safe

Create a hr.attendant in a stage where a mail template is present.
Fill the email field as: Name Surname <name@surname.com>

Before this commit:
- the created partner's email has been rendered as name@surname.com&gt;
- the email failed to be sended because of this

This was because Jinja rendered that snippet escaping the special characters
Putting a 'pipe' safe in the snippet does the trick

After this commit:
both the partner and the email are created successfuly

OPW 1830739
closes #24059
parent 0fc2ee8c
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@
<record id="email_template_data_applicant_refuse" model="mail.template">
<field name="name">Applicant: Refuse</field>
<field name="subject">Application refused</field>
<field name="email_to">${object.email_from}</field>
<field name="email_to">${object.email_from | safe}</field>
<field name="partner_to">${object.partner_id and object.partner_id.id or ''}</field>
<field name="lang">${object.partner_id and object.partner_id.lang or ''}</field>
<field name="model_id" ref="hr_recruitment.model_hr_applicant"/>
......@@ -37,7 +37,7 @@ Unfortunately, your profile does not match with our needs</p>
<record id="email_template_data_applicant_interest" model="mail.template">
<field name="name">Applicant: Interest</field>
<field name="subject">Application approved</field>
<field name="email_to">${object.email_from}</field>
<field name="email_to">${object.email_from | safe}</field>
<field name="partner_to">${object.partner_id and object.partner_id.id or ''}</field>
<field name="lang">${object.partner_id and object.partner_id.lang or ''}</field>
<field name="model_id" ref="hr_recruitment.model_hr_applicant"/>
......
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