summaryrefslogtreecommitdiff
path: root/addons/survey/data/mail_template_data.xml
blob: 1e138281ec999b78e23a5f75f1000d0991bd9be8 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="mail_template_user_input_invite" model="mail.template">
            <field name="name">Survey: Invite</field>
            <field name="model_id" ref="model_survey_user_input" />
            <field name="subject">Participate to ${object.survey_id.title} survey</field>
            <field name="email_to">${(object.partner_id.email_formatted or object.email) |safe}</field>
            <field name="body_html" type="html">
<div style="margin: 0px; padding: 0px; font-size: 13px;">
    <p style="margin: 0px; padding: 0px; font-size: 13px;">
        Dear ${object.partner_id.name or 'participant'}<br/><br/>
        % if object.survey_id.certification:
            You have been invited to take a new certification.
        % else:
            We are conducting a survey and your response would be appreciated.
        % endif
        <div style="margin: 16px 0px 16px 0px;">
            <a href="${(object.get_start_url()) | safe}"
                style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
                % if object.survey_id.certification:
                    Start Certification
                % else:
                    Start Survey
                % endif
            </a>
        </div>
        % if object.deadline:
            Please answer the survey for ${format_date(object.deadline)}.<br/><br/>
        % endif
        Thank you for your participation.
    </p>
</div>
            </field>
            <field name="lang">${object.partner_id.lang}</field>
            <field name="auto_delete" eval="True"/>
        </record>

        <!-- Certification Email template -->
        <record id="mail_template_certification" model="mail.template">
            <field name="name">Survey: Send certification by email</field>
            <field name="model_id" ref="survey.model_survey_user_input"/>
            <field name="subject">Certification: ${object.survey_id.display_name}</field>
            <field name="email_from">${(object.survey_id.create_uid.email_formatted or user.email_formatted or user.company_id.catchall_formatted) |safe}</field>
            <field name="email_to">${(object.partner_id.email_formatted or object.email) |safe}</field>
            <field name="body_html" type="xml">
                <div style="background:#F0F0F0;color:#515166;padding:10px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">
                    <table style="width:600px;margin:5px auto;">
                        <tbody>
                            <tr><td>
                                <!-- We use the logo of the company that created the survey (to handle multi company cases) -->
                                <a href="/"><img src="/logo.png?company=${object.survey_id.create_uid.company_id.id}" style="vertical-align:baseline;max-width:100px;" /></a>
                            </td><td style="text-align:right;vertical-align:middle;">
                                    Certification: ${object.survey_id.display_name}
                            </td></tr>
                        </tbody>
                    </table>
                    <table style="width:600px;margin:0px auto;background:white;border:1px solid #e1e1e1;">
                        <tbody>
                            <tr><td style="padding:15px 20px 10px 20px;">
                                <p>Dear <span>${object.partner_id.name or 'participant'}</span></p>
                                <p>
                                    Here is, in attachment, your certification document for
                                        <strong>${object.survey_id.display_name}</strong>
                                </p>
                                <p>Congratulations for succeeding the test!</p>
                            </td></tr>
                        </tbody>
                    </table>
                </div>
            </field>
            <field name="report_template" ref="certification_report"/>
            <field name="report_name">Certification Document</field>
            <field name="lang">${object.partner_id.lang}</field>
            <field name="auto_delete" eval="True"/>
        </record>
    </data>
</odoo>