From 02443b54c8b313866180515c9cdced9fe6437c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Mon, 1 Jun 2026 15:51:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/controllers/applet_attendance.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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'),