diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index accc3c96c..0caea3b95 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -169,6 +169,18 @@ class YuthonVacationReports(models.Model): rec.year_workday += workday_overtime_add rec.year_holiday += holidays_overtime_add + if rec.working_overtime > 0: + working_overtime_lines = rec.overtime_ids.filtered( + lambda o: not o.workflow_record_id and o.text == '上月额度继承' + ) + working_overtime_lines.workday = rec.working_overtime * 8 + + if rec.leave > 0: + leave_lines = rec.leave_ids.filtered( + lambda o: not o.workflow_record_id and o.text == '上月额度继承' + ) + leave_lines.update_lines = rec.leave * 8 + def update_vacation(self): """