helpdesk_rating_five_stars/data/mail_templates.xml
2025-11-26 10:39:26 +07:00

94 lines
5.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Email template for 5-star rating request -->
<record id="rating_ticket_request_email_template_five_stars" model="mail.template">
<field name="name">Helpdesk: Ticket Rating Request (5 Stars)</field>
<field name="model_id" ref="helpdesk.model_helpdesk_ticket"/>
<field name="subject">{{ object.company_id.name or object.user_id.company_id.name or 'Helpdesk' }}: Service Rating Request</field>
<field name="email_from">{{ (object.team_id.alias_email_from or object.company_id.email_formatted or object._rating_get_operator().email_formatted or user.email_formatted) }}</field>
<field name="email_to">{{ (object.partner_email if not object.sudo().partner_id.email or object.sudo().partner_id.email != object.partner_email else '') }}</field>
<field name="partner_to">{{ object.partner_id.id if object.sudo().partner_id.email and object.sudo().partner_id.email == object.partner_email else '' }}</field>
<field name="description">5-star rating request email template for helpdesk tickets</field>
<field name="body_html" type="html">
<div>
<t t-set="access_token" t-value="object._rating_get_access_token()"/>
<t t-set="partner" t-value="object._rating_get_partner()"/>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; margin:0;">
<tbody>
<tr><td valign="top" style="font-size: 14px;">
<t t-if="partner.name">
Hello <t t-out="partner.name or ''">Brandon Freeman</t>,<br/><br/>
</t>
<t t-else="">
Hello,<br/><br/>
</t>
Please take a moment to rate our services related to the ticket "<strong t-out="object.name or ''">Table legs are unbalanced</strong>"
<t t-if="object._rating_get_operator().name">
assigned to <strong t-out="object._rating_get_operator().name or ''">Mitchell Admin</strong>.<br/>
</t>
<t t-else="">
.<br/><br/>
</t>
</td></tr>
<tr><td style="text-align: center;">
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; margin: 32px 0px 32px 0px; display: inline-table;">
<tr><td style="font-size: 14px; text-align:center;">
<strong>How would you rate your support experience?</strong><br/>
<span style="color: #888888; font-size: 13px;">(click on a star to rate)</span>
</td></tr>
<tr><td style="font-size: 14px; padding-top: 20px;">
<table style="width:100%; text-align:center; margin-top: 1rem;">
<tr>
<td style="padding: 0 8px;">
<a t-attf-href="/rating/{{ access_token }}/1" style="text-decoration: none; font-size: 48px; color: #FFD700; display: inline-block; transition: transform 0.2s;">
</a>
<div style="font-size: 11px; color: #666; margin-top: 4px;">Poor</div>
</td>
<td style="padding: 0 8px;">
<a t-attf-href="/rating/{{ access_token }}/2" style="text-decoration: none; font-size: 48px; color: #FFD700; display: inline-block; transition: transform 0.2s;">
</a>
<div style="font-size: 11px; color: #666; margin-top: 4px;">Fair</div>
</td>
<td style="padding: 0 8px;">
<a t-attf-href="/rating/{{ access_token }}/3" style="text-decoration: none; font-size: 48px; color: #FFD700; display: inline-block; transition: transform 0.2s;">
</a>
<div style="font-size: 11px; color: #666; margin-top: 4px;">Good</div>
</td>
<td style="padding: 0 8px;">
<a t-attf-href="/rating/{{ access_token }}/4" style="text-decoration: none; font-size: 48px; color: #FFD700; display: inline-block; transition: transform 0.2s;">
</a>
<div style="font-size: 11px; color: #666; margin-top: 4px;">Very Good</div>
</td>
<td style="padding: 0 8px;">
<a t-attf-href="/rating/{{ access_token }}/5" style="text-decoration: none; font-size: 48px; color: #FFD700; display: inline-block; transition: transform 0.2s;">
</a>
<div style="font-size: 11px; color: #666; margin-top: 4px;">Excellent</div>
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>
<tr><td valign="top" style="font-size: 14px;">
We appreciate your feedback. It helps us improve continuously.
<br/><br/>
<span style="margin: 0px 0px 0px 0px; font-size: 12px; opacity: 0.5; color: #454748;">
This customer survey has been sent because your ticket has been moved to the stage <b t-out="object.stage_id.name or ''">In Progress</b>.
</span>
</td></tr>
</tbody>
</table>
</div>
</field>
<field name="lang">{{ object.partner_id.lang or object.user_id.lang or user.lang }}</field>
<field name="auto_delete" eval="True"/>
</record>
</data>
</odoo>