Initial commit
This commit is contained in:
85
fusion_clock/data/mail_template_data.xml
Normal file
85
fusion_clock/data/mail_template_data.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
]]></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_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>
|
||||
]]></field>
|
||||
<field name="report_template_ids" eval="[(4, ref('fusion_clock.action_report_clock_batch'))]"/>
|
||||
<field name="auto_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user