This commit is contained in:
gsinghpal
2026-03-16 08:14:56 -04:00
parent fdca9518ab
commit e56974d46f
196 changed files with 19739 additions and 3471 deletions

View File

@@ -37,6 +37,7 @@
<th style="padding:8px; text-align:center;">Breaks (min)</th>
<th style="padding:8px; text-align:center;">Late In</th>
<th style="padding:8px; text-align:center;">Early Out</th>
<th style="padding:8px; text-align:center;">Leave</th>
</tr>
</thead>
<tbody>
@@ -45,6 +46,7 @@
<t t-set="emp_dates" t-value="set(a.check_in.date() for a in emp_atts if a.check_in)"/>
<t t-set="late_count" t-value="len(doc.env['fusion.clock.penalty'].search([('employee_id', '=', emp.id), ('date', '>=', doc.date_start), ('date', '&lt;=', doc.date_end), ('penalty_type', '=', 'late_in')]))"/>
<t t-set="early_count" t-value="len(doc.env['fusion.clock.penalty'].search([('employee_id', '=', emp.id), ('date', '>=', doc.date_start), ('date', '&lt;=', doc.date_end), ('penalty_type', '=', 'early_out')]))"/>
<t t-set="emp_leaves" t-value="doc.leave_request_ids.filtered(lambda l: l.employee_id == emp)"/>
<tr t-attf-style="background: {{ '#f8f9fa' if emp_index % 2 == 0 else '#ffffff' }};">
<td style="padding:6px 8px; border-bottom:1px solid #e0e0e0; font-weight:bold;">
<t t-esc="emp.name"/>
@@ -69,6 +71,10 @@
t-attf-style="color: {{ '#ef4444' if early_count else '#1a1d23' }};">
<t t-esc="early_count"/>
</td>
<td style="padding:6px 8px; border-bottom:1px solid #e0e0e0; text-align:center;"
t-attf-style="color: {{ '#3b82f6' if emp_leaves else '#1a1d23' }};">
<t t-esc="len(emp_leaves)"/>
</td>
</tr>
</t>
</tbody>