diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index ac7025844..0dd2ee0fb 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -126,7 +126,7 @@ class HrAttendance(models.Model): ('checkin_time', '>=', fields.Datetime.to_string(utc_start)), ('checkin_time', '<', fields.Datetime.to_string(utc_end)) ] - detail_records = self.env['hr.attendance.detail'].search([domain]) + detail_records = self.env['hr.attendance.detail'].search(domain) if detail_records: max_checkin_time = max(detail_records.mapped('checkin_time')) vals['check_out'] = max_checkin_time