diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index efd764e74..34d337f59 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -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'),