Merge pull request !4429 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-08-10 02:09:00 +00:00
committed by Gitee
+4 -4
View File
@@ -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}天"