Purpose of this merge is to remove the ugly __URL__ hack of survey templates. It is solved by making template rendered on user_input model. This means each invitation recipient will received its own rendered mail. Small jinja code allows therefore to include the url in a clean odoo-style way. Subject and body in survey invite wizard are not rendered anymore. It means jinja could be displayed. This is necessary as this wizard will work in batch mode, rendering the body on each recipient. This commit is linked to task ID 1911586 and PR #28986.
29 lines
1.3 KiB
XML
29 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
<record id="mail_template_user_input_invite" model="mail.template">
|
|
<field name="name">Survey: Send by email</field>
|
|
<field name="model_id" ref="model_survey_user_input" />
|
|
<field name="subject">Participate to ${object.survey_id.title} survey</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/>
|
|
We are conducting a survey and your response would be appreciated.
|
|
<div style="margin: 16px 0px 16px 0px;">
|
|
<a href="${('%s?token=%s' % (object.survey_id.public_url, object.token)) | safe}"
|
|
style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
|
|
Start Survey
|
|
</a>
|
|
</div>
|
|
Please answer the appraisal for ${format_date(object.deadline)}.<br/><br/>
|
|
Thank you for your participation.
|
|
</p>
|
|
</div>
|
|
</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
<field name="user_signature" eval="False"/>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo> |