summaryrefslogtreecommitdiff
path: root/addons/gamification/views/mail_templates.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/gamification/views/mail_templates.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/gamification/views/mail_templates.xml')
-rw-r--r--addons/gamification/views/mail_templates.xml55
1 files changed, 55 insertions, 0 deletions
diff --git a/addons/gamification/views/mail_templates.xml b/addons/gamification/views/mail_templates.xml
new file mode 100644
index 00000000..e8a6a6a3
--- /dev/null
+++ b/addons/gamification/views/mail_templates.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <record id="mail_template_data_new_rank_reached" model="mail.template">
+ <field name="name">User: New rank reached</field>
+ <field name="model_id" ref="base.model_res_users"/>
+ <field name="subject">New rank: ${object.rank_id.name}</field>
+ <field name="email_to"></field>
+ <field name="partner_to">${object.partner_id.id}</field>
+ <field name="body_html" type="html">
+<div style="background:#F0F0F0;color:#515166;padding:10px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">
+<table style="width:600px;margin:0px auto;background:white;border:1px solid #e1e1e1;">
+ <tbody>
+ <tr>
+ <td style="padding:15px 20px 10px 20px;">
+ <p>
+ Congratulations
+ <span>${object.name or ''}</span>!
+ </p>
+ <p>
+ You just reached a new rank : <strong>${object.rank_id.name}</strong>
+ </p>
+ % if object.next_rank_id.name
+ <p>Continue your work to become a <strong>${object.next_rank_id.name}</strong> !</p>
+ % endif
+ <div style="margin: 16px 0px 16px 0px;">
+ % set gamification_redirection_data = object.get_gamification_redirection_data()
+ % for data in gamification_redirection_data
+ % set url = data['url']
+ % set label = data['label']
+ <a href="${url}" style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">${label}</a>
+ % endfor
+ </div>
+ </td>
+ <td style="padding:15px 20px 10px 20px;">
+ <p style="text-align: center;">
+ <img src="/web/image/gamification.karma.rank/${object.rank_id.id}/image_128"/>
+ </p>
+ </td>
+ </tr>
+ % if user.signature
+ <tr>
+ <td style="padding:15px 20px 10px 20px;">
+ ${user.signature | safe}
+ </td>
+ </tr>
+ % endif
+ </tbody>
+ </table>
+</div></field>
+ <field name="lang">${object.lang}</field>
+ <field name="auto_delete" eval="True"/>
+ </record>
+ </data>
+</odoo>