From e4dd586cefebaec19683386712f4a0d69a1bb165 Mon Sep 17 00:00:00 2001 From: mohammed-alkhazrji Date: Tue, 23 Dec 2025 23:04:54 +0300 Subject: [PATCH 1/2] fix bug --- odex25_hr/to_attendance_system/models/models.py | 2 ++ odex25_hr/to_attendance_system/views/views.xml | 1 + odex25_hr/to_attendance_system/wizard/attendaces_wizard.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/odex25_hr/to_attendance_system/models/models.py b/odex25_hr/to_attendance_system/models/models.py index 419d88372..eba1d6a08 100644 --- a/odex25_hr/to_attendance_system/models/models.py +++ b/odex25_hr/to_attendance_system/models/models.py @@ -12,6 +12,7 @@ class SystemAttendance(models.Model): _order = 'punch_time DESC' punch_state = fields.Char("Punch state", readonly=True) + punch_state_display = fields.Char("Punch state display", readonly=True) area_alias = fields.Char("Area", readonly=True) crc = fields.Char("CRC", readonly=True) verify_type = fields.Integer("Verify type", readonly=True) @@ -551,6 +552,7 @@ class BiotimeAPI(models.Model): data = { 'attendance_id': tx['id'], 'punch_state': tx['punch_state'], + 'punch_state_display': tx['punch_state_display'], 'area_alias': tx['area_alias'], # 'crc': tx['crc'], 'crc': tx['emp'], diff --git a/odex25_hr/to_attendance_system/views/views.xml b/odex25_hr/to_attendance_system/views/views.xml index fa9dee20b..770ce451c 100644 --- a/odex25_hr/to_attendance_system/views/views.xml +++ b/odex25_hr/to_attendance_system/views/views.xml @@ -222,6 +222,7 @@ + diff --git a/odex25_hr/to_attendance_system/wizard/attendaces_wizard.py b/odex25_hr/to_attendance_system/wizard/attendaces_wizard.py index 17bc2355c..a2333ec21 100644 --- a/odex25_hr/to_attendance_system/wizard/attendaces_wizard.py +++ b/odex25_hr/to_attendance_system/wizard/attendaces_wizard.py @@ -45,7 +45,7 @@ class AttendanceWizard(models.TransientModel): attendance.create({ 'employee_id': tx.emp_code.hr_employee.id, 'name': tx.punch_time, - 'action': 'sign_in' if tx.punch_state in ["1", "4", "5"] else 'sign_out', + 'action': 'sign_in' if tx.punch_state in ["0", "2", "4"] else 'sign_out', 'action_date': tx.punch_time, }) tx.write({ From 941670b481345ee375cd98482be1ef4306c73cd1 Mon Sep 17 00:00:00 2001 From: mohammed-alkhazrji Date: Tue, 23 Dec 2025 23:11:12 +0300 Subject: [PATCH 2/2] fix bug --- odex25_hr/to_attendance_system/i18n/ar_001.po | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/odex25_hr/to_attendance_system/i18n/ar_001.po b/odex25_hr/to_attendance_system/i18n/ar_001.po index b45b29f7a..b34b780cb 100644 --- a/odex25_hr/to_attendance_system/i18n/ar_001.po +++ b/odex25_hr/to_attendance_system/i18n/ar_001.po @@ -342,6 +342,12 @@ msgstr "معرف الوظيفة" msgid "Punch state" msgstr "حالة البصمة" +#. module: to_attendance_system +#: model:ir.model.fields,field_description:to_attendance_system.field_finger_system_attendance__punch_state_display +msgid "Punch state display" +msgstr "عرض حالة البصمة" + + #. module: to_attendance_system #: model:ir.model.fields,field_description:to_attendance_system.field_finger_system_attendance__punch_time msgid "Punch time"