diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index db25873e4..e93a9bbb3 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -940,7 +940,7 @@ class YuthonVacationReports(models.Model): if rec.remaining_parental_leave and last_month_record.parenting_line_ids: update_date = last_month_record.parenting_line_ids[0].update_date end_date = last_month_record.parenting_line_ids[0].end_date - if rec.end_date: + if end_date: date_condition = update_date <= rec.vacation_date <= end_date else: date_condition = rec.vacation_date >= update_date