From ee11cb931701264914f2ccb3196e2aaae2801df2 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: Sat, 7 Mar 2026 17:27:18 +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_vacation_reports.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 181946f45..38ca0f8b0 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -781,6 +781,7 @@ class YuthonVacationReports(models.Model): exp_approval = self.env['expatriation.approval'].sudo().search([ ('expatriates_ids', 'in', [employee.id]), # 外派人员包含当前员工 ('start_date', '<=', month_end), # 外派开始日期 <= 当月末 + ('work_end', '=', True) ], limit=1) if exp_approval: @@ -791,7 +792,8 @@ class YuthonVacationReports(models.Model): back_approval = self.env['back.approval'].sudo().search([ ('expatriates_id', '=', employee.id), # 匹配当前员工 ('end_date', '>=', month_start), # 返回结束日期 >= 当月初 - ('end_date', '<=', month_end), # 返回结束日期 <= 当月末 + ('end_date', '<=', month_end), # 返回结束日期 <= 当月末 + ('work_end', '=', True) ], limit=1) if back_approval: