summaryrefslogtreecommitdiff
path: root/addons/website_mail_channel/data
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2016-04-20 13:29:25 +0200
committerMartin Trigaux <mat@odoo.com>2016-07-05 17:24:36 +0200
commit2407f793a68d4ac348ba13f0dc0b8b974660a0fd (patch)
treea0af17074987c19f5985e1c3550b6945c290b880 /addons/website_mail_channel/data
parent26be95592c260e451acd42e86408326a1a39844c (diff)
[FIX] website_mail_channel: public user (un)registration
Allows public users to unsubscribe to a mailing list. Before this patch, a user had to be connected with an account with subscribing. For public users, a confirmation email is sent to subscribe and unsubscribe to a list. Use hmac signatures to prevent fake (un)subscriptions.
Diffstat (limited to 'addons/website_mail_channel/data')
-rw-r--r--addons/website_mail_channel/data/mail_template_data.xml29
1 files changed, 29 insertions, 0 deletions
diff --git a/addons/website_mail_channel/data/mail_template_data.xml b/addons/website_mail_channel/data/mail_template_data.xml
new file mode 100644
index 00000000000..31c602f99a3
--- /dev/null
+++ b/addons/website_mail_channel/data/mail_template_data.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="mail_template_list_subscribe" model="mail.template">
+ <field name="name">Subscribe to mailing list</field>
+ <field name="model_id" ref="mail.model_mail_channel"/>
+ <field name="subject">Please confirm subscription to ${object.name}</field>
+ <field name="body_html" type="xml">
+<p>Hello,</p>
+<p>You have requested to be subscribed to the mailing list <strong>${object.name}</strong></p>
+<p>To confirm, please visit the following link:</p>
+<p><strong><a href="${ctx['token_url']}">${ctx['token_url']}</a></strong></p>
+<p>If this was a mistake or you did not requested this action, please ignore this message.</p>
+</field>
+ </record>
+
+ <record id="mail_template_list_unsubscribe" model="mail.template">
+ <field name="name">Unsubscribe to mailing list</field>
+ <field name="model_id" ref="mail.model_mail_channel"/>
+ <field name="subject">Please confirm unsubscription to ${object.name}</field>
+ <field name="body_html" type="xml">
+<p>Hello,</p>
+<p>You have requested to be unsubscribed to the mailing list <strong>${object.name}</strong></p>
+<p>To confirm, please visit the following link:</p>
+<p><strong><a href="${ctx['token_url']}">${ctx['token_url']}</a></strong></p>
+<p>If this was a mistake or you did not requested this action, please ignore this message.</p>
+</field>
+ </record>
+</odoo>