diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 317894b39..00ef6ec58 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -174,7 +174,7 @@ class YuthonVacationReports(models.Model): right_days = 0 actual_attendance = 0 # 实到天数 = 应到天数 - 请假总天数 - 异常天数 + 法定节假日 total_leave_days = 0 # 请假工作流总天数(含小时折算) - is_retired = rec.employee.user_state in ('leave', 'withdraw') + is_retired = rec.employee_id.user_state in ('leave', 'withdraw') if rec.employee_id and rec.vacation_date and not is_retired: year = rec.vacation_date.year month = rec.vacation_date.month