diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index d16289b27..9cff7eb8b 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -178,7 +178,7 @@ class AppletAttendance(Controller): check_in_str = check_in.strftime('%H:%M:%S') if check_in else ' ' check_out_str = check_out.strftime('%H:%M:%S') if check_out else ' ' has_leave_batch_workflow = False - if attendance_id.workflow_id and attendance_id.workflow_id.res_model in ['hr.leave.batch', 'go.approval']: + if attendance_id.workflow_id and attendance_id.workflow_id.res_model in ['hr.leave.batch', 'go.approval', 'card.approval']: has_leave_batch_workflow = True check_in_html = f'

{check_in_str}

' if (has_leave_batch_workflow or shift_name == '外派') else ( @@ -778,13 +778,13 @@ class AppletAttendance(Controller): has_leave_batch_workflow = False if hasattr(att, 'workflow_id') and att.workflow_id: - if att.workflow_id.res_model in ['hr.leave.batch', 'go.approval']: + if att.workflow_id.res_model in ['hr.leave.batch', 'go.approval', 'card.approval']: has_leave_batch_workflow = True 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 or is_rest_shift or att.shift_name == '外派': color_select = 1 else: has_exception = (check_in_status in ['迟到', '早退', '缺卡', '旷工']) or (