update
This commit is contained in:
@@ -1,164 +1,190 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
|
||||
Email templates for Fusion Clock.
|
||||
Design: Matches the Fusion email design system (thin accent bar, system fonts,
|
||||
dark/light mode safe, no user signatures).
|
||||
-->
|
||||
<odoo noupdate="1">
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Employee Individual Report Email -->
|
||||
<!-- =============================================================== -->
|
||||
<record id="mail_template_clock_employee_report" model="mail.template">
|
||||
<field name="name">Fusion Clock: Employee Report</field>
|
||||
<field name="model_id" ref="fusion_clock.model_fusion_clock_report"/>
|
||||
<field name="subject">Your Attendance Report - {{ object.date_start }} to {{ object.date_end }}</field>
|
||||
<field name="email_from">{{ (object.company_id.email or user.email_formatted) }}</field>
|
||||
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
||||
<field name="email_to">{{ object.employee_id.work_email or '' }}</field>
|
||||
<field name="body_html"><![CDATA[
|
||||
<div style="margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;">
|
||||
<table width="600" style="margin:0 auto;background:#ffffff;border:1px solid #e0e0e0;border-radius:8px;">
|
||||
<tr>
|
||||
<td style="padding:24px 32px;background:#1a1d23;border-radius:8px 8px 0 0;">
|
||||
<h2 style="color:#10B981;margin:0;">Fusion Clock</h2>
|
||||
<p style="color:#9ca3af;margin:4px 0 0;">Attendance Report</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:24px 32px;">
|
||||
<p>Hello <strong>{{ object.employee_id.name }}</strong>,</p>
|
||||
<p>Your attendance report for the period <strong>{{ object.date_start }}</strong> to <strong>{{ object.date_end }}</strong> is ready.</p>
|
||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
||||
<div style="height:4px;background-color:#10B981;"></div>
|
||||
<div style="padding:32px 28px;">
|
||||
<p style="color:#10B981;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
||||
<t t-out="object.company_id.name"/>
|
||||
</p>
|
||||
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Attendance Report</h2>
|
||||
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
||||
Hello <strong><t t-out="object.employee_id.name"/></strong>,
|
||||
your attendance report for
|
||||
<strong><t t-out="object.date_start" t-options="{'widget': 'date'}"/></strong> to
|
||||
<strong><t t-out="object.date_end" t-options="{'widget': 'date'}"/></strong> is ready.
|
||||
</p>
|
||||
|
||||
<table width="100%" style="margin:16px 0;border-collapse:collapse;">
|
||||
<tr style="background:#f8f9fa;">
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Days Worked</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ object.days_worked }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Total Hours</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ '%.1f' % object.total_hours }}h</td>
|
||||
</tr>
|
||||
<tr style="background:#f8f9fa;">
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Net Hours</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ '%.1f' % object.net_hours }}h</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Total Breaks</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ '%.0f' % object.total_breaks }} min</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
||||
<tr><td colspan="2" style="padding:10px 14px;font-size:12px;font-weight:600;opacity:0.55;text-transform:uppercase;letter-spacing:0.5px;border-bottom:2px solid rgba(128,128,128,0.25);">Report Summary</td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Days Worked</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.days_worked"/></td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Total Hours</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="'%.1f' % object.total_hours"/>h</td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Net Hours</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="'%.1f' % object.net_hours"/>h</td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Total Breaks</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="'%.0f' % object.total_breaks"/> min</td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Penalties</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.total_penalties"/></td></tr>
|
||||
</table>
|
||||
|
||||
<p>The full PDF report is attached. You can also download it from your portal at any time.</p>
|
||||
<p style="color:#6b7280;font-size:12px;">This is an automated message from Fusion Clock.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding:10px 14px;border:1px dashed rgba(128,128,128,0.35);border-radius:6px;margin:0 0 24px 0;">
|
||||
<p style="margin:0;font-size:13px;opacity:0.65;"><strong style="opacity:1;">Attached:</strong> Attendance Report (PDF)</p>
|
||||
</div>
|
||||
|
||||
<div style="border-left:3px solid #10B981;padding:12px 16px;margin:0 0 24px 0;">
|
||||
<p style="margin:0;font-size:14px;line-height:1.5;">You can also download this report from your portal at any time.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:16px 28px;text-align:center;">
|
||||
<p style="opacity:0.5;font-size:11px;line-height:1.5;margin:0;">
|
||||
<t t-out="object.company_id.name"/><br/>
|
||||
This is an automated notification from Fusion Clock.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
]]></field>
|
||||
<field name="report_template_ids" eval="[(4, ref('fusion_clock.action_report_clock_employee'))]"/>
|
||||
<field name="auto_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Batch Report Email (to managers) -->
|
||||
<!-- =============================================================== -->
|
||||
<record id="mail_template_clock_batch_report" model="mail.template">
|
||||
<field name="name">Fusion Clock: Batch Report</field>
|
||||
<field name="model_id" ref="fusion_clock.model_fusion_clock_report"/>
|
||||
<field name="subject">Employee Attendance Batch Report - {{ object.date_start }} to {{ object.date_end }}</field>
|
||||
<field name="email_from">{{ (object.company_id.email or user.email_formatted) }}</field>
|
||||
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
||||
<field name="email_to">{{ (object.company_id.sudo().env['ir.config_parameter'].get_param('fusion_clock.report_recipient_emails') or '') }}</field>
|
||||
<field name="body_html"><![CDATA[
|
||||
<div style="margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;">
|
||||
<table width="600" style="margin:0 auto;background:#ffffff;border:1px solid #e0e0e0;border-radius:8px;">
|
||||
<tr>
|
||||
<td style="padding:24px 32px;background:#1a1d23;border-radius:8px 8px 0 0;">
|
||||
<h2 style="color:#10B981;margin:0;">Fusion Clock</h2>
|
||||
<p style="color:#9ca3af;margin:4px 0 0;">Batch Attendance Report</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:24px 32px;">
|
||||
<p>The attendance batch report for <strong>{{ object.date_start }}</strong> to <strong>{{ object.date_end }}</strong> is attached.</p>
|
||||
<p>This report includes all employees' attendance summaries with daily breakdowns, total hours, and penalty information.</p>
|
||||
<p style="color:#6b7280;font-size:12px;">This is an automated message from Fusion Clock.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
||||
<div style="height:4px;background-color:#10B981;"></div>
|
||||
<div style="padding:32px 28px;">
|
||||
<p style="color:#10B981;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
||||
<t t-out="object.company_id.name"/>
|
||||
</p>
|
||||
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Batch Attendance Report</h2>
|
||||
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
||||
The attendance batch report for
|
||||
<strong><t t-out="object.date_start" t-options="{'widget': 'date'}"/></strong> to
|
||||
<strong><t t-out="object.date_end" t-options="{'widget': 'date'}"/></strong> is attached.
|
||||
</p>
|
||||
|
||||
<div style="padding:10px 14px;border:1px dashed rgba(128,128,128,0.35);border-radius:6px;margin:0 0 24px 0;">
|
||||
<p style="margin:0;font-size:13px;opacity:0.65;"><strong style="opacity:1;">Attached:</strong> Batch Attendance Report (PDF)</p>
|
||||
</div>
|
||||
|
||||
<div style="border-left:3px solid #10B981;padding:12px 16px;margin:0 0 24px 0;">
|
||||
<p style="margin:0;font-size:14px;line-height:1.5;">This report includes all employees' attendance summaries with daily breakdowns, total hours, and penalty information.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:16px 28px;text-align:center;">
|
||||
<p style="opacity:0.5;font-size:11px;line-height:1.5;margin:0;">
|
||||
<t t-out="object.company_id.name"/><br/>
|
||||
This is an automated notification from Fusion Clock.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
]]></field>
|
||||
<field name="report_template_ids" eval="[(4, ref('fusion_clock.action_report_clock_batch'))]"/>
|
||||
<field name="auto_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Weekly Summary Email -->
|
||||
<!-- =============================================================== -->
|
||||
<record id="mail_template_weekly_summary" model="mail.template">
|
||||
<field name="name">Fusion Clock: Weekly Summary</field>
|
||||
<field name="model_id" ref="hr.model_hr_employee"/>
|
||||
<field name="subject">Your Weekly Attendance Summary</field>
|
||||
<field name="email_from">{{ (object.company_id.email or user.email_formatted) }}</field>
|
||||
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
||||
<field name="email_to">{{ object.work_email or '' }}</field>
|
||||
<field name="body_html"><![CDATA[
|
||||
<div style="margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;">
|
||||
<table width="600" style="margin:0 auto;background:#ffffff;border:1px solid #e0e0e0;border-radius:8px;">
|
||||
<tr>
|
||||
<td style="padding:24px 32px;background:#1a1d23;border-radius:8px 8px 0 0;">
|
||||
<h2 style="color:#10B981;margin:0;">Fusion Clock</h2>
|
||||
<p style="color:#9ca3af;margin:4px 0 0;">Weekly Summary</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:24px 32px;">
|
||||
<p>Hello <strong>{{ object.name }}</strong>,</p>
|
||||
<p>Here is your attendance summary for the past week:</p>
|
||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
||||
<div style="height:4px;background-color:#10B981;"></div>
|
||||
<div style="padding:32px 28px;">
|
||||
<p style="color:#10B981;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
||||
<t t-out="object.company_id.name"/>
|
||||
</p>
|
||||
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Weekly Summary</h2>
|
||||
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
||||
Hello <strong><t t-out="object.name"/></strong>,
|
||||
here is your attendance summary for the past week.
|
||||
</p>
|
||||
|
||||
<table width="100%" style="margin:16px 0;border-collapse:collapse;">
|
||||
<tr style="background:#f8f9fa;">
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Total Hours</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ ctx.get('total_hours', 0) }}h</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Overtime</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ ctx.get('overtime_hours', 0) }}h</td>
|
||||
</tr>
|
||||
<tr style="background:#f8f9fa;">
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Penalties</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ ctx.get('penalty_count', 0) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>Absences</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ ctx.get('absence_count', 0) }}</td>
|
||||
</tr>
|
||||
<tr style="background:#f8f9fa;">
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;"><strong>On-Time Streak</strong></td>
|
||||
<td style="padding:8px 12px;border:1px solid #e0e0e0;">{{ ctx.get('streak', 0) }} days</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
||||
<tr><td colspan="2" style="padding:10px 14px;font-size:12px;font-weight:600;opacity:0.55;text-transform:uppercase;letter-spacing:0.5px;border-bottom:2px solid rgba(128,128,128,0.25);">Summary</td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Total Hours</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="ctx.get('total_hours', 0)"/>h</td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Overtime</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="ctx.get('overtime_hours', 0)"/>h</td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Penalties</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="ctx.get('penalty_count', 0)"/></td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Absences</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="ctx.get('absence_count', 0)"/></td></tr>
|
||||
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">On-Time Streak</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="ctx.get('streak', 0)"/> days</td></tr>
|
||||
</table>
|
||||
|
||||
<p>Log in to <a href="/my/clock">your portal</a> to view details.</p>
|
||||
<p style="color:#6b7280;font-size:12px;">This is an automated message from Fusion Clock.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="border-left:3px solid #10B981;padding:12px 16px;margin:0 0 24px 0;">
|
||||
<p style="margin:0;font-size:14px;line-height:1.5;">Log in to <a href="/my/clock" style="color:#10B981;">your portal</a> to view full details.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:16px 28px;text-align:center;">
|
||||
<p style="opacity:0.5;font-size:11px;line-height:1.5;margin:0;">
|
||||
<t t-out="object.company_id.name"/><br/>
|
||||
This is an automated notification from Fusion Clock.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
]]></field>
|
||||
<field name="auto_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Correction Request Notification -->
|
||||
<!-- =============================================================== -->
|
||||
<record id="mail_template_correction_request" model="mail.template">
|
||||
<field name="name">Fusion Clock: Correction Request</field>
|
||||
<field name="model_id" ref="fusion_clock.model_fusion_clock_correction"/>
|
||||
<field name="subject">Timesheet Correction Request: {{ object.employee_id.name }}</field>
|
||||
<field name="email_from">{{ (object.company_id.email or user.email_formatted) }}</field>
|
||||
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
||||
<field name="body_html"><![CDATA[
|
||||
<div style="margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;">
|
||||
<table width="600" style="margin:0 auto;background:#ffffff;border:1px solid #e0e0e0;border-radius:8px;">
|
||||
<tr>
|
||||
<td style="padding:24px 32px;background:#1a1d23;border-radius:8px 8px 0 0;">
|
||||
<h2 style="color:#10B981;margin:0;">Fusion Clock</h2>
|
||||
<p style="color:#9ca3af;margin:4px 0 0;">Correction Request</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:24px 32px;">
|
||||
<p><strong>{{ object.employee_id.name }}</strong> has submitted a timesheet correction request.</p>
|
||||
<p><strong>Reason:</strong> {{ object.reason }}</p>
|
||||
<p>Please review and approve/reject from the Fusion Clock backend.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
||||
<div style="height:4px;background-color:#d69e2e;"></div>
|
||||
<div style="padding:32px 28px;">
|
||||
<p style="color:#d69e2e;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
||||
<t t-out="object.company_id.name"/>
|
||||
</p>
|
||||
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Correction Request</h2>
|
||||
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
||||
<strong><t t-out="object.employee_id.name"/></strong> has submitted a timesheet correction request.
|
||||
</p>
|
||||
|
||||
<div style="border-left:3px solid #d69e2e;padding:12px 16px;margin:0 0 24px 0;">
|
||||
<p style="margin:0;font-size:14px;line-height:1.5;"><strong>Reason:</strong> <t t-out="object.reason"/></p>
|
||||
</div>
|
||||
|
||||
<div style="border-left:3px solid #10B981;padding:12px 16px;margin:0 0 24px 0;">
|
||||
<p style="margin:0;font-size:14px;line-height:1.5;">Please review and approve or reject from the Fusion Clock backend.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:16px 28px;text-align:center;">
|
||||
<p style="opacity:0.5;font-size:11px;line-height:1.5;margin:0;">
|
||||
<t t-out="object.company_id.name"/><br/>
|
||||
This is an automated notification from Fusion Clock.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
]]></field>
|
||||
<field name="auto_delete" eval="False"/>
|
||||
|
||||
Reference in New Issue
Block a user