Merge pull request !11828 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-06-01 07:52:57 +00:00
committed by Gitee
@@ -752,17 +752,15 @@ class AppletAttendance(Controller):
if att.workflow_id.res_model in ['hr.leave.batch', 'go.approval']:
has_leave_batch_workflow = True
is_rest_shift = getattr(att, 'shift_name', '') == '休息'
if not check_in_status and not check_out_status:
color_select = 3
else:
if has_leave_batch_workflow or is_rest_shift:
if has_leave_batch_workflow:
color_select = 1
else:
has_exception = (check_in_status in ['迟到', '早退', '缺卡', '旷工']) or (
check_out_status in ['迟到', '早退', '缺卡', '旷工'])
color_select = 3 if has_exception else 1
color_select = 2 if has_exception else 1
records.append({
'date': att.current_data.strftime('%Y/%m/%d'),