From b6f73fb185c4101b102f1189d4808bba2fd2f3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Wed, 15 Apr 2026 11:31:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/models/go_approval.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yuthon_hr_attendance/models/go_approval.py b/yuthon_hr_attendance/models/go_approval.py index e11378be0..59ec723c1 100644 --- a/yuthon_hr_attendance/models/go_approval.py +++ b/yuthon_hr_attendance/models/go_approval.py @@ -58,13 +58,12 @@ class GoApprovals(models.Model): if not rec.start_date or not rec.end_date or not rec.employee_ids: continue for employee in rec.employee_ids: - # 查找同一员工其他外出申请中时间段有交叉的记录(排除自身,排除已撤销的) + # 查找同一员工其他外出申请中时间段有交叉的记录(排除自身,active=False即撤销的自动被排除) overlapping = self.env['go.approval'].search([ ('id', '!=', rec.id), ('employee_ids', 'in', employee.id), ('start_date', '<=', rec.end_date), ('end_date', '>=', rec.start_date), - ('reclaim_state', '=', False), ]) if overlapping: raise ValidationError(