summaryrefslogtreecommitdiff
path: root/addons/event/data/email_template_data.xml
diff options
context:
space:
mode:
authormcm-odoo <mcm@odoo.com>2019-10-24 06:08:59 +0000
committerThibault Delavallée <tde@odoo.com>2020-02-11 14:01:13 +0000
commitde1743ab126309d6c2b6a189305ce6a3e1e1fd18 (patch)
tree5296e946ee1cd55498afd8a356642c9d7ebfd73e /addons/event/data/email_template_data.xml
parent5018b01dc7e0e5f2c2198367f13ec41b1ed402c7 (diff)
[REF] mail, various: remove user_signature field from mail.template
RATIONALE Mail template model holds a field telling odoo mail engine to automatically add the current user's signature to the body. Its use depends on the use case * using the template in the composer on a single record: it is displayed in the rendered template in the composer, meaning people could change it. This behavior is interesting as it allows to see the email content; * using the template in the composer in mass mail mode: it is not displayed as only the raw jinja is displayed. It is therefore not obvious that it will be appended to the body of the mail. People could add it manually and have 2 signatures as a result; A mechanism automatically adding a signature to sent emails when posting a message is already implemented and is based on template existence. If a template has been used when posting, no signature is added in sent emails. Otherwise it is automatically added. This behavior should not change. Behavior will therefore be * use a template -> specify signature usage in it manually through jinja; * do not use a template -> signature added in sent emails; SPECIFICATIONS Remove user_signature. Update template body accordingly. In customer oriented templates that are using it and do not already contain it, manually add a call to user.signature within the jinja code. When set to False, just remove its declaration. Quickly clean some signature integration. LINKS Task ID 2089252 Community PR odoo/odoo#39482 Enterprise PR odoo/enterprise#6459 Upgrade PR odoo/upgrate#761 Related: odoo/enterprise#6459 Related: odoo/upgrade#761 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Co-authored-by: Michaël Mattiello <mcm@odoo.com> Co-authored-by: Thibault Delavallée <tde@odoo.com>
Diffstat (limited to 'addons/event/data/email_template_data.xml')
-rw-r--r--addons/event/data/email_template_data.xml8
1 files changed, 3 insertions, 5 deletions
diff --git a/addons/event/data/email_template_data.xml b/addons/event/data/email_template_data.xml
index 11827e2e829..9ee4351ff89 100644
--- a/addons/event/data/email_template_data.xml
+++ b/addons/event/data/email_template_data.xml
@@ -15,8 +15,9 @@
Here is your badge for the event ${object.event_id.name}.<br/>
If you have any questions, please let us know.
<br/><br/>
- Thank you,<br/>
- % if object.event_id.user_id and object.event_id.user_id.signature:
+ Thank you,
+ % if object.event_id.user_id.signature:
+ <br />
${object.event_id.user_id.signature | safe}
% endif
</div></field>
@@ -24,7 +25,6 @@
<field name="report_name">badge_of_${(object.event_id.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="auto_delete" eval="True"/>
- <field name="user_signature" eval="False"/>
</record>
<record id="event_subscription" model="mail.template">
@@ -221,7 +221,6 @@
</table>
</field>
<field name="lang">${object.partner_id.lang}</field>
- <field name="user_signature" eval="False"/>
</record>
<record id="event_reminder" model="mail.template">
@@ -418,7 +417,6 @@
</table>
</field>
<field name="lang">${object.partner_id.lang}</field>
- <field name="user_signature" eval="False"/>
</record>
</data>