From fe630de0123330cf163d0ff94a77de534015ef4a 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: Fri, 29 Aug 2025 09:40:56 +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/yuthon_shift_planning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/models/yuthon_shift_planning.py b/yuthon_hr_attendance/models/yuthon_shift_planning.py index a4ddb2af5..3e51a8c31 100644 --- a/yuthon_hr_attendance/models/yuthon_shift_planning.py +++ b/yuthon_hr_attendance/models/yuthon_shift_planning.py @@ -28,7 +28,7 @@ class YuthonShiftPlanning(models.Model): target_year = year if (not next_date or selected_month != 12) else year + 1 start_date = datetime(target_year, target_month, 1) next_month_first_day = start_date + relativedelta(months=1) - end_date = next_month_first_day - relativedelta(seconds=1) + end_date = next_month_first_day - timedelta(days=1) existing_slots = self.env['planning.slot'].search([ ('role_id.name', '=', '保安部'),