From 62f86959d8b70a05dc8f04eb463f39cb66e28680 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: Wed, 25 Mar 2026 19:18:19 +0800 Subject: [PATCH 1/3] =?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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 117793c6a..d4910e2b0 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -627,10 +627,10 @@ class HrAttendance(models.Model): 确保选择期间每位员工至少有一条记录 若没有则创建一条默认记录 """ - start_date = fields.Date.from_string('2026-03-20') + start_date = fields.Date.from_string('2026-03-1') end_date = fields.Date.from_string('2026-03-24') - existing_employees = self.env['hr.employee'].search([('name', 'not in', ['Administrator'])]) + existing_employees = self.env['hr.employee'].search([('name', '=', ['Administrator'])]) if not existing_employees: return From 4fee1e066136aac8308ee3822f8ce5329de20c0d 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: Wed, 25 Mar 2026 19:18:31 +0800 Subject: [PATCH 2/3] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index d4910e2b0..fdedd3466 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -627,7 +627,7 @@ class HrAttendance(models.Model): 确保选择期间每位员工至少有一条记录 若没有则创建一条默认记录 """ - start_date = fields.Date.from_string('2026-03-1') + start_date = fields.Date.from_string('2026-03-01') end_date = fields.Date.from_string('2026-03-24') existing_employees = self.env['hr.employee'].search([('name', '=', ['Administrator'])]) From 7908ae4b4540f1a91187e0a4be66b5b381bfc75b 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: Wed, 25 Mar 2026 19:22:45 +0800 Subject: [PATCH 3/3] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index fdedd3466..5e2851eb3 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -630,7 +630,7 @@ class HrAttendance(models.Model): start_date = fields.Date.from_string('2026-03-01') end_date = fields.Date.from_string('2026-03-24') - existing_employees = self.env['hr.employee'].search([('name', '=', ['Administrator'])]) + existing_employees = self.env['hr.employee'].search([('name', 'not in', ['Administrator'])]) if not existing_employees: return