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: