From 42aedc3e8887b24019d8249b6a448d8ecc3c3fda Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 9 Jan 2025 17:33:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/models/hr_attendance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 46dfb1c0d..c17fd5576 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -158,12 +158,12 @@ class HrAttendance(models.Model): min_hour = int(min_hour_from) min_minute = int(min_hour_from * 10 % min_hour_from) will_datetime_start = current_date.replace(year=year, month=month, day=day, hour=min_hour, minute=min_minute) - timedelta(hours=8) - record.write({'check_in': will_datetime_start, 'is_approval': True, 'is_abnormal':False}) + record.write({'check_in': will_datetime_start, 'is_approval': True, 'is_abnormal':False, 'is_no_card':False, 'is_early_card':False, 'is_late_card':False}) max_hour_to = record.employee_id.resource_id.calendar_id.attendance_ids[-1].hour_to max_hour = int(max_hour_to) max_minute = int(max_hour_to * 10 % max_hour_to) will_datetime_end = current_date.replace(year=year, month=month, day=day, hour=max_hour, minute=max_minute) - timedelta(hours=8) - record.write({'check_out': will_datetime_end, 'is_approval': True, 'is_abnormal':False }) + record.write({'check_out': will_datetime_end, 'is_approval': True, 'is_abnormal':False, 'is_no_card':False, 'is_early_card':False, 'is_late_card':False }) def button_batch_correct(self): attendance_ids = self.env["hr.attendance"].browse(self._context.get('active_ids', self._context.get('active_id'))) @@ -177,13 +177,13 @@ class HrAttendance(models.Model): min_minute = int(min_hour_from * 10 % min_hour_from) will_datetime_start = current_date.replace(year=year, month=month, day=day, hour=min_hour, minute=min_minute) - timedelta(hours=8) - record.write({'check_in': will_datetime_start, 'is_approval': True, 'is_abnormal':False}) + record.write({'check_in': will_datetime_start, 'is_approval': True, 'is_abnormal':False, 'is_no_card':False, 'is_early_card':False, 'is_late_card':False}) max_hour_to = record.employee_id.resource_id.calendar_id.attendance_ids[-1].hour_to max_hour = int(max_hour_to) max_minute = int(max_hour_to * 10 % max_hour_to) will_datetime_end = current_date.replace(year=year, month=month, day=day, hour=max_hour, minute=max_minute) - timedelta(hours=8) - record.write({'check_out': will_datetime_end, 'is_approval': True, 'is_abnormal':False}) + record.write({'check_out': will_datetime_end, 'is_approval': True, 'is_abnormal':False, 'is_no_card':False, 'is_early_card':False, 'is_late_card':False}) @api.depends('current_data') def _compute_week(self):