From 130561895c6c9e73bdfa223f2934f7b6a72e88d0 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, 18 May 2026 16:00:17 +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/models/hr_attendance.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 0c5f5085d..9c5f21d41 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -1304,6 +1304,17 @@ class HrAttendance(models.Model): pass #todo 待过 def update_attendance(self, employee, current_date): + # 判断当天入职: + if current_date <= employee.entry_date: + self.write({ + 'is_no_card': False, + 'is_early_card': False, + 'is_late_card': False, + 'is_abnormal': False, + 'absenteeism_card': False + }) + return + if self.workflow_id: if self.workflow_id.res_model == 'card.approval': self.write({