diff --git a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py index e8c50ff6d..4516b4ca0 100644 --- a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py +++ b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py @@ -111,7 +111,8 @@ class HrAttendanceDetail(models.Model): employee_list.append(resource_id.employee_id.id) if not record.employee_id.id in employee_list: start_dt = slot_start_dt.date() - days = self.env['yuthon.vacation.reports']._create_leave_record(record.employee_id, start_dt, slot_end_dt) + end_dt = slot_end_dt.date() + days = self.env['yuthon.vacation.reports']._create_leave_record(record.employee_id, start_dt, end_dt) else: monthly_slots = self.env['planning.slot'].search([ ('employee_id', '=', record.employee_id.id),