diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index a5ebafc17..bfc970df2 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -802,11 +802,11 @@ class HolidaysRequestBatch(models.Model): for record in self: reports_id = self.env['yuthon.vacation.reports'].search([('employee_id', '=', record.users_id.employee_id.id)], limit=1) if reports_id and not record.log_ids: - leave_hours_str = reports_id.leave.split('小时')[0].strip() - leave_hours = float(leave_hours_str) + # leave_hours_str = reports_id.leave + leave_hours = reports_id.leave leave_days = leave_hours / 8 - overtime_hours_str = reports_id.working_overtime.split('小时')[0].strip() - overtime_hours = float(overtime_hours_str) + # overtime_hours_str = reports_id.working_overtime.split('小时')[0].strip() + overtime_hours = reports_id.working_overtime overtime_days = overtime_hours / 8 record.holiday_allowance = f"年假{leave_days:.1f}天, 补休{overtime_days:.1f}天"