Merge pull request !9035 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-02-26 11:42:51 +00:00
committed by Gitee
@@ -733,13 +733,20 @@ class AppletAttendance(Controller):
else:
check_out_str = '' if is_weekend else '缺卡'
has_leave_batch_workflow = False
if hasattr(att, 'workflow_id') and att.workflow_id:
if att.workflow_id.res_model == 'hr.leave.batch':
has_leave_batch_workflow = True
if not check_in_status and not check_out_status:
color_select = 3
else:
has_exception = (check_in_status in ['迟到', '早退', '缺卡', '旷工']) or (
check_out_status in ['迟到', '早退', '缺卡', '旷工'])
color_select = 2 if has_exception else 1
if has_leave_batch_workflow:
color_select = 1
else:
has_exception = (check_in_status in ['迟到', '早退', '缺卡', '旷工']) or (
check_out_status in ['迟到', '早退', '缺卡', '旷工'])
color_select = 2 if has_exception else 1
records.append({
'date': att.current_data.strftime('%Y/%m/%d'),