summaryrefslogtreecommitdiff
path: root/addons/survey/data/mail_template_data.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-10-23 12:56:36 +0000
committerThibault Delavallée <tde@odoo.com>2019-11-29 13:35:14 +0000
commitb9a22d2f24e587894c12bf7ad289fcddcea8a823 (patch)
tree4b958db8a774c45b51a5a7a80b817d50695643cb /addons/survey/data/mail_template_data.xml
parent351b0ca6f4f493fed3542c8f52e8ec70ee622b7e (diff)
[IMP] mail: add computed fields for company emails
Purpose of this commit is to give a way to access to company email and catchall with formatting. Those will be used in various automated emails. Indeed currently several templates use either ``company_id.partner_id.email``, ``company_id.email``, or even don't provide fallback values. With this commit from a company record people will be able to use * a correctly formatted catchall: ``"My Company Name" <catchall_alias@catchall_domain>`` * an email_formatted field like partner email_formatted that is either its partner-related email_formatted value, or formatted catchall if its partner is not correctly configured; Various calls to mail creation are updated accordingly. Task ID 1853147 PR #32243
Diffstat (limited to 'addons/survey/data/mail_template_data.xml')
-rw-r--r--addons/survey/data/mail_template_data.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/survey/data/mail_template_data.xml b/addons/survey/data/mail_template_data.xml
index 96506fb928a..5c5d8fecc33 100644
--- a/addons/survey/data/mail_template_data.xml
+++ b/addons/survey/data/mail_template_data.xml
@@ -42,7 +42,7 @@
<field name="name">Survey: Send certification by email</field>
<field name="model_id" ref="survey.model_survey_user_input"/>
<field name="subject">Certification: ${object.survey_id.display_name}</field>
- <field name="email_from">${(object.survey_id.create_uid.email_formatted or user.email_formatted or user.company_id.catchall) |safe}</field>
+ <field name="email_from">${(object.survey_id.create_uid.email_formatted or user.email_formatted or user.company_id.catchall_formatted) |safe}</field>
<field name="email_to">${(object.partner_id.email_formatted or object.email) |safe}</field>
<field name="body_html" type="xml">
<div style="background:#F0F0F0;color:#515166;padding:10px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">