diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py index 507e70548..767de8d73 100644 --- a/yuthon_hr_attendance/models/overtime_approval.py +++ b/yuthon_hr_attendance/models/overtime_approval.py @@ -314,8 +314,8 @@ class OvertimeApprovals(models.Model): @api.depends('users_id', 'duration', 'start_time', 'end_time') def _compute_name(self): for rec in self: - start_time_str = rec.start_time.strftime('%Y-%m-%d %H:%M') if rec.start_time else '无' - end_time_str = rec.end_time.strftime('%H:%M') if rec.end_time else '无' + start_time_str = (rec.start_time + timedelta(hours=8)).strftime('%Y-%m-%d %H:%M') if rec.start_time else '无' + end_time_str = (rec.end_time.strftime+ timedelta(hours=8))('%H:%M') if rec.end_time else '无' if rec.duration == 0: rec.name = f"{rec.users_id.name}加班 {start_time_str}-{end_time_str}" else: