File: mail_template_data.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (376 lines) | stat: -rw-r--r-- 26,043 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <record id="email_template_badge_received" model="mail.template">
            <field name="name">Gamification: Badge Received</field>
            <field name="subject">New badge {{ object.badge_id.name }} granted</field>
            <field name="model_id" ref="gamification.model_gamification_badge_user"/>
            <field name="partner_to">{{ object.user_id.partner_id.id }}</field>
            <field name="description">Sent automatically to the user who received a badge</field>
            <field name="body_html" type="html">
<table border="0" cellpadding="0" style="padding-top: 16px; background-color: #F1F1F1; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
<table border="0" width="590" cellpadding="0" style="padding: 16px; background-color: white; color: #454748; border-collapse:separate;" summary="o_mail_notification">
<tbody>
    <!-- HEADER -->
    <tr>
        <td align="center" style="min-width: 590px;">
            <table width="590" border="0" cellpadding="0" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;">
                <tr><td valign="middle">
                    <span style="font-size: 10px;">Your Badge</span><br/>
                    <span style="font-size: 20px; font-weight: bold;" t-out="object.badge_id.name or ''"></span>
                </td><td valign="middle" align="right" t-if="not object.user_id.company_id.uses_default_logo">
                    <img t-attf-src="/logo.png?company={{ object.user_id.company_id.id }}" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="object.user_id.company_id.name"/>
                </td></tr>
                <tr><td colspan="2" style="text-align:center;">
                  <hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;"/>
                </td></tr>
            </table>
        </td>
    </tr>
    <!-- CONTENT -->
    <tr>
        <td align="center" style="min-width: 590px;">
            <table width="590" border="0" cellpadding="0" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;">
                <tr><td valign="top" style="font-size: 14px;">
                    <div>
                        Congratulations <t t-out="object.user_id.name or ''"></t>!<br/>
                        You just received badge <strong t-out="object.badge_id.name or ''"></strong>!<br/>
                        <table t-if="not is_html_empty(object.badge_id.description)" cellspacing="0" cellpadding="0" border="0" style="width: 560px; margin-top: 5px;">
                            <tbody><tr>
                                <td valign="center">
                                    <img t-attf-src="/web/image/gamification.badge/{{ object.badge_id.id }}/image_128/80x80" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="user.company_id.name"/>
                                </td>
                                <td valign="center">
                                    <cite t-out="object.badge_id.description or ''"></cite>
                                </td>
                            </tr></tbody>
                        </table>
                        <br/>
                        <t t-if="object.sender_id">
                            This badge was granted by <strong t-out="object.sender_id.name or ''"></strong>.
                        </t>
                        <br/>
                        <t t-if="object.comment" t-out="object.comment or ''"></t>
                        <br/><br/>
                        Thank you,
                        <t t-if="object.sender_id.signature">
                            <br />
                            <t t-out="object.sender_id.signature or ''"></t>
                        </t>
                    </div>
                </td></tr>
                <tr><td style="text-align:center;">
                  <hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;"/>
                </td></tr>
            </table>
        </td>
    </tr>
    <!-- FOOTER -->
    <tr>
        <td align="center" style="min-width: 590px;">
            <table width="590" border="0" cellpadding="0" style="min-width: 590px; background-color: white; font-size: 12px; padding: 0px 8px 0px 8px; border-collapse:separate;">
                <tr><td valign="middle" align="left">
                    <t t-out="object.user_id.company_id.name or ''">YourCompany</t>
                </td></tr>
                <tr><td valign="middle" align="left" style="opacity: 0.7;">
                    <t t-out="object.user_id.company_id.phone or ''">+1 650-123-4567</t>
                    <t t-if="object.user_id.company_id.email">
                        | <a t-attf-href="'mailto:%s' % {{ object.user_id.company_id.email }}" style="text-decoration:none; color: #454748;" t-out="object.user_id.company_id.email or ''">info@yourcompany.com</a>
                    </t>
                    <t t-if="object.user_id.company_id.website">
                        | <a t-attf-href="'%s' % {{ object.user_id.company_id.website }}" style="text-decoration:none; color: #454748;" t-out="object.user_id.company_id.website or ''">http://www.example.com</a>
                    </t>
                </td></tr>
            </table>
        </td>
    </tr>
</tbody>
</table>
</td></tr>
<!-- POWERED BY -->
<tr><td align="center" style="min-width: 590px;">
    <table width="590" border="0" cellpadding="0" style="min-width: 590px; background-color: #F1F1F1; color: #454748; padding: 8px; border-collapse:separate;">
      <tr><td style="text-align: center; font-size: 14px;">
        Powered by <a target="_blank" href="https://www.odoo.com?utm_source=db&amp;utm_medium=gamification" style="color: #875A7B;">Odoo</a>
      </td></tr>
    </table>
</td></tr>
</table></field>
            <field name="lang">{{ object.user_id.lang }}</field>
            <field name="auto_delete" eval="True"/>
        </record>

        <record id="email_template_goal_reminder" model="mail.template">
            <field name="name">Gamification: Reminder For Goal Update</field>
            <field name="model_id" ref="gamification.model_gamification_goal"/>
            <field name="partner_to">{{ object.user_id.partner_id.id }}</field>
            <field name="description">Sent automatically to participant who haven't updated their goal</field>
            <field name="body_html" type="html">
<div>
    <strong>Reminder</strong><br/>
    You have not updated your progress for the goal <t t-out="object.definition_id.name or ''"></t> (currently reached at <t t-out="object.completeness or ''"></t>%) for at least <t t-out="object.remind_update_delay or ''"></t> days. Do not forget to do it.
    <br/><br/>
    Thank you,
    <t t-if="object.challenge_id.manager_id.signature">
        <br />
        <t t-out="object.challenge_id.manager_id.signature or ''"></t>
    </t>
</div></field>
            <field name="lang">{{ object.user_id.lang }}</field>
            <field name="auto_delete" eval="True"/>
        </record>
        
        <record id="simple_report_template" model="mail.template">
            <field name="name">Gamification: Challenge Report</field>
            <field name="model_id" ref="gamification.model_gamification_challenge"/>
            <field name="description">Send a challenge report to all participants</field>
            <field name="body_html" type="html">
<table cellspacing="0" cellpadding="0" width="100%" style="background-color: #EEE; border-collapse: collapse;">
<tr>
    <td valign="top" align="center">
        <t t-set="object_ctx" t-value="ctx.get('object')"/>
        <t t-set="company" t-value="object_ctx and object_ctx.company_id or user.company_id"/>
        <t t-set="challenge_lines" t-value="ctx.get('challenge_lines', [])"/>
        <table cellspacing="0" cellpadding="0" width="600" style="margin: 0 auto; width: 570px;">
            <tr><td>
                <table cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <div>
                            <t t-if="object.visibility_mode == 'ranking'">
                                <td style="padding:15px;">
                                    <p style="font-size:20px;color:#666666;" align="center">Leaderboard</p>
                                </td>
                            </t>
                        </div>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#fff" style="background-color:#fff;">
                    <tr><td style="padding: 15px;">
                        <t t-if="object.visibility_mode == 'personal'">
                            <span style="color:#666666;font-size:13px;">Here is your current progress in the challenge <strong t-out="object.name or ''"></strong>.</span>
                            <table cellspacing="0" cellpadding="0" width="100%" style="margin-top:20px;">
                                <tr>
                                    <td align="center">
                                        <div>Personal Performance</div>
                                    </td>
                                </tr>
                            </table>
                            <table cellspacing="0" cellpadding="0" width="100%" style="margin-top:30px;color:#666666;">
                                <thead>
                                    <tr style="color:#9A6C8E; font-size:12px;">
                                        <th align="left" style="padding-bottom: 0px;width:40%;text-align:left;">Goals</th>
                                        <th style="width:20%;text-align:right;" align="left">Target</th>
                                        <th style="width:20%;text-align:right;" align="right">Current</th>
                                        <th style="width:20%;text-align:right;" align="right">Completeness</th>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="height:1px;background-color:#9A6C8E;"></td>
                                    </tr>
                                </thead>
                                <tbody t-foreach="challenge_lines" t-as="line">
                                    <tr style="font-weight:bold;">
                                        <td style="padding: 20px 0;" align="left">
                                            <t t-out="line['name'] or ''"></t>
                                            <t t-if="line['suffix'] or line['monetary']">
                                                (<t t-out="line['full_suffix'] or ''"></t>)
                                            </t>
                                        </td>
                                        <td style="padding: 20px 0;" align="right"><t t-out="&quot;%.2f&quot; % line['target'] or ''"></t>
                                            <t t-if="line['suffix']" t-out="line['suffix'] or ''"></t>
                                        </td>
                                        <td style="padding: 20px 0;" align="right"><t t-out="&quot;%.2f&quot; % line['current'] or ''"></t>
                                            <t t-if="line['suffix']" t-out="line['suffix'] or ''"></t>
                                        </td>
                                        <td style="padding: 20px 0;font-size:25px;color:#9A6C8E;" align="right"><strong><t t-out="int(line['completeness']) or ''"></t>%</strong></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="height:1px;background-color:#e3e3e3;"></td>
                                    </tr>
                                </tbody>
                            </table>                   
                        </t>
                        <t t-else="">
                            <span style="color:#A8A8A8;font-size:13px;">
                                Challenge: <strong t-out="object.name or ''"></strong>.
                            </span> 
                            <t t-foreach="challenge_lines" t-as="line">
                                <!-- Header + Button table -->
                                <table cellspacing="0" cellpadding="0" width="100%" style="margin-top:35px;">
                                    <tr>
                                        <td width="50%">
                                            <div>Top Achievers for goal <strong t-out="line['name'] or ''"></strong></div>
                                        </td>
                                    </tr>
                                </table>
                                <!-- Podium -->
                                <t t-if="len(line['goals']) == 2">
                                    <table cellspacing="0" cellpadding="0" width="100%" style="margin-top:10px;">
                                        <tr><td style="padding:0 30px;">
                                            <table cellspacing="0" cellpadding="0" width="100%" style="table-layout: fixed;">
                                                <tr>
                                                    <t t-set="top_goals" t-value="line['goals'][:3]"/>
                                                    <t t-foreach="top_goals" t-as="goal">
                                                        <td align="center" style="width:32%;">
                                                            <t t-if="loop.index == 1">
                                                                <t t-set="extra_div" t-value="'&lt;div style=&quot;height:40px;&quot;&gt;&lt;/div&gt;'"/>
                                                                <t t-set="heightA" t-value="95"/>
                                                                <t t-set="heightB" t-value="75"/>
                                                                <t t-set="bgColor" t-value="'#b898b0'"/>
                                                                <t t-set="fontSize" t-value="50"/>
                                                                <t t-set="podiumPosition" t-value="'2'"/>
                                                            </t>
                                                            <t t-elif="loop.index == 2">
                                                                <t t-set="extra_div" t-value="''"/>
                                                                <t t-set="heightA" t-value="55"/>
                                                                <t t-set="heightB" t-value="115"/>
                                                                <t t-set="bgColor" t-value="'#9A6C8E'"/>
                                                                <t t-set="fontSize" t-value="85"/>
                                                                <t t-set="podiumPosition" t-value="'1'"/>
                                                            </t>
                                                            <t t-elif="loop.index == 3">
                                                                <t t-set="extra_div" t-value="'&lt;div style=&quot;height:60px;&quot;&gt;&lt;/div&gt;'"/>
                                                                <t t-set="heightA" t-value="115"/>
                                                                <t t-set="heightB" t-value="55"/>
                                                                <t t-set="bgColor" t-value="'#c8afc1'"/>
                                                                <t t-set="fontSize" t-value="35"/>
                                                                <t t-set="podiumPosition" t-value="'3'"/>
                                                            </t>
                                                            <div style="margin:0 3px 0 3px;height:220px;">
                                                                <div t-attf-style="height:{{ heightA }}px;">
                                                                    <t t-out="extra_div or ''"></t>
                                                                    <div style="height:55px;">
                                                                        <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;object-fit:cover;" t-att-src="image_data_uri(object.env['res.users'].browse(goal['user_id']).partner_id.image_128)" t-att-alt="goal['name']"/>
                                                                    </div>
                                                                    <div align="center" t-attf-style ="color:{{ bgColor }};height:20px">
                                                                        <t t-out="goal['name'] or ''"></t>
                                                                    </div>
                                                                </div>
                                                                <div t-attf-style="background-color:{{ bgColor }};height:{{ heightB }}px;">
                                                                    <strong><span t-attf-style="color:#fff;font-size:{{ fontSize }}px;" t-out="podiumPosition or ''"></span></strong>
                                                                </div>
                                                                <div style="height:30px;">
                                                                    <t t-out="&quot;%.2f&quot; % goal['current'] or ''"></t>
                                                                    <t t-if="line['suffix'] or line['monetary']">
                                                                        <t t-out="line['full_suffix'] or ''"></t>
                                                                    </t>
                                                                </div>
                                                            </div>
                                                        </td>
                                                    </t>
                                                </tr>
                                            </table>
                                            </td>
                                        </tr>
                                    </table>
                                </t>
                                <!-- data table -->
                                <table cellspacing="0" cellpadding="0" width="100%" style="margin-bottom:5px">
                                    <tr>
                                        <td>
                                            <table cellspacing="0" cellpadding="0" width="100%" style="margin-top:30px;margin-bottom:5px;color:#666666;">
                                                <thead>
                                                    <tr style="color:#9A6C8E; font-size:12px;">
                                                        <th style="width:15%;text-align:center;">Rank</th>
                                                        <th style="width:25%;text-align:left;">Name</th>
                                                        <th style="width:30%;text-align:right;">Performance 
                                                            <t t-if="line['suffix']">
                                                                (<t t-out="line['suffix'] or ''"></t>)
                                                            </t>
                                                            <t t-elif="line['monetary']">
                                                                (<t t-out="company.currency_id.symbol or ''"></t>)
                                                            </t>
                                                        </th>
                                                        <th style="width:30%;text-align:right;">Completeness</th>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="5" style="height:1px;background-color:#9A6C8E;"></td>
                                                    </tr>
                                                </thead>
                                                <tbody t-foreach="line['goals']" t-as="goal">
                                                    <tr>
                                                        <t t-set="tdBgColor" t-value="'#fff'"/>
                                                        <t t-set="tdColor" t-value="'gray'"/>
                                                        <t t-set="mutedColor" t-value="'#AAAAAA'"/>
                                                        <t t-set="tdPercentageColor" t-value="'#9A6C8E'"/>
                                                        <td width="15%" align="center" valign="middle" t-attf-style="background-color:{{ tdBgColor }};padding :5px 0;font-size:20px;"><t t-out="goal['rank']+1 or ''"></t>
                                                        </td>
                                                        <td width="25%" align="left" valign="middle" t-attf-style="background-color:{{ tdBgColor }};padding :5px 0;font-size:13px;"><t t-out="goal['name'] or ''"></t></td>
                                                        <td width="30%" align="right" t-attf-style="background-color:{{ tdBgColor }};padding:5px 0;line-height:1;"><t t-out="&quot;%.2f&quot; % goal['current'] or ''"></t><br/><span t-attf-style="font-size:13px;color:{{ mutedColor }};">on <t t-out="&quot;%.2f&quot; % line['target'] or ''"></t></span>
                                                        </td>
                                                        <td width="30%" t-attf-style="color:{{ tdPercentageColor }};background-color:{{ tdBgColor }};padding-right:15px;font-size:22px;" align="right"><strong><t t-out="int(goal['completeness']) or ''"></t>%</strong></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="5" style="height:1px;background-color:#DADADA;"></td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                </table> 
                            </t>
                        </t>
                    </td></tr>
                </table>
            </td></tr>
        </table>
    </td>
</tr>
</table>
            </field>
        </record>

        <record id="mail_template_data_new_rank_reached" model="mail.template">
            <field name="name">Gamification: 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="description">Sent automatically when user reaches a new rank</field>
            <field name="body_html" type="html">
<div style="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 t-out="object.name or ''">Joel Willis</span>!
                </p>
                <p>
                    You just reached a new rank: <strong t-out="object.rank_id.name or ''">Newbie</strong>
                </p>
                <t t-if="object.next_rank_id.name">
                    <p>Continue your work to become a <strong t-out="object.next_rank_id.name or ''">Student</strong>!</p>
                </t>
                <div style="margin: 16px 0px 16px 0px;">
                    <t t-set="gamification_redirection_data" t-value="object.get_gamification_redirection_data()"/>
                    <t t-foreach="gamification_redirection_data" t-as="data">
                        <t t-set="url" t-value="data['url']"/>
                        <t t-set="label" t-value="data['label']"/>
                        <a t-att-href="url" style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;" t-out="label or ''">LABEL</a>
                    </t>
                </div>
            </td>
            <td style="padding:15px 20px 10px 20px;">
                <p style="text-align: center;">
                    <img t-attf-src="/web/image/gamification.karma.rank/{{ object.rank_id.id }}/image_128"/>
                </p>
            </td>
        </tr>
        <tr>
            <td t-if="not user.share and user.active" style="padding:15px 20px 10px 20px;">
                <t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
            </td>
            <td t-else="" style="padding:15px 20px 10px 20px;">
                <t t-out="user.company_id.name or ''"/>
            </td>
        </tr>
    </tbody>
 </table>
</div></field>
            <field name="lang">{{ object.lang }}</field>
            <field name="auto_delete" eval="True"/>
        </record>

    </data>
</odoo>