Files
odoo_source/addons/website_mail_channel/data/mail_template_data.xml
T
Thibault Delavallée 31abe454b9 [FIX] website_mail_channel: improve (un)subscribe emails content and display
When people (un)subscribe from mail channels through frontend interface
a confirmation email is sent. However if this emails fails if may be
displayed in channel chatter as there is an underlying ``mail.message``.
As this message contains recipient-specific content it is better to avoid
displaying it.

Mail message_type is therefore set to ``user_notification`` meaning only
author and recipient have access to message content. Moreover it is never
displayed in any chatter.

In this commit we also remove custom layouting of mail template bodies. We
instead fall back on rendering template body encapsulated within a notification
layout.

Finally some more information for author is also added: author is set to
channel creator, and email_from to formatted email of the company instead
of its simple version.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:06:42 +00:00

47 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="mail_template_list_subscribe" model="mail.template">
<field name="name">Channel: Mailing list subscription</field>
<field name="model_id" ref="mail.model_mail_channel"/>
<field name="subject">Confirm subscription to ${object.name}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
Hello,<br/><br/>
You have requested to be subscribed to the mailing list <strong>${object.name}</strong>.
<br/><br/>
To confirm, please visit the following link: <strong><a href="${ctx['token_url']}">${ctx['token_url']}</a></strong>
<br/><br/>
If this was a mistake or you did not requested this action, please ignore this message.
% if user.signature
<br/>
${user.signature | safe}
% endif
</div></field>
<field name="auto_delete" eval="True"/>
</record>
<record id="mail_template_list_unsubscribe" model="mail.template">
<field name="name">Channel: Mailing list unsubscription</field>
<field name="model_id" ref="mail.model_mail_channel"/>
<field name="subject">Confirm unsubscription to ${object.name}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
Hello,<br/><br/>
You have requested to be unsubscribed to the mailing list <strong>${object.name}</strong>.
<br/><br/>
To confirm, please visit the following link: <strong><a href="${ctx['token_url']}">${ctx['token_url']}</a></strong>.
<br/><br/>
If this was a mistake or you did not requested this action, please ignore this message.
% if user.signature:
<br/>
${user.signature | safe}
% endif
</div></field>
<field name="auto_delete" eval="True"/>
</record>
</data>
</odoo>