From 995bfa2e98a961c0c7ecac2c4566bba3410542fe 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 16:11:12 +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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 34d337f59..f6bda974e 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -684,9 +684,9 @@ class AppletAttendance(Controller): def process_attendances(self, attendances, user_id): records = [] for att in attendances: - is_weekend = not self.is_workday(att.current_data) - + is_weekend = False if not att.shift_id: + is_weekend = not self.is_workday(att.current_data) year = att.current_data.year month = att.current_data.month day = att.current_data.day @@ -752,10 +752,12 @@ 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: + if has_leave_batch_workflow or is_rest_shift: color_select = 1 else: has_exception = (check_in_status in ['迟到', '早退', '缺卡', '旷工']) or (