Browse Source

[FIX] Bug Fixed

pull/150/head
Ajmalcybrosys 6 years ago
parent
commit
4914f76093
  1. 2
      hr_zk_attendance/__manifest__.py
  2. 5
      hr_zk_attendance/doc/RELEASE_NOTES.md
  3. 7
      hr_zk_attendance/models/zk_machine.py

2
hr_zk_attendance/__manifest__.py

@ -21,7 +21,7 @@
################################################################################### ###################################################################################
{ {
'name': 'Biometric Device Integration', 'name': 'Biometric Device Integration',
'version': '12.0.1.0.0', 'version': '12.0.1.0.1',
'summary': """Integrating Biometric Device With HR Attendance (Face + Thumb)""", 'summary': """Integrating Biometric Device With HR Attendance (Face + Thumb)""",
'description': 'This module integrates Odoo with the biometric device(Model: ZKteco uFace 202)', 'description': 'This module integrates Odoo with the biometric device(Model: ZKteco uFace 202)',
'category': 'Generic Modules/Human Resources', 'category': 'Generic Modules/Human Resources',

5
hr_zk_attendance/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 12.0.1.0.0 #### Version 12.0.1.0.0
##### ADD ##### ADD
- Initial commit - Initial commit
#### 26.11.2019
#### Version 12.0.1.0.1
##### FIX
- Bug Fixed

7
hr_zk_attendance/models/zk_machine.py

@ -130,7 +130,10 @@ class ZkMachine(models.Model):
users = {} users = {}
if len(zk.userdata) > 0: if len(zk.userdata) > 0:
userdata = zk.userdata[0] for x in range(len(zk.userdata)):
if x > 0:
zk.userdata[x] = zk.userdata[x][8:]
userdata = b''.join(zk.userdata)
userdata = userdata[11:] userdata = userdata[11:]
while len(userdata) > 72: while len(userdata) > 72:
uid, role, password, name, userid = unpack('2s2s8s28sx31s', userdata.ljust(72)[:72]) uid, role, password, name, userid = unpack('2s2s8s28sx31s', userdata.ljust(72)[:72])
@ -195,7 +198,7 @@ class ZkMachine(models.Model):
attendance = [] attendance = []
if len(zk.attendancedata) > 0: if len(zk.attendancedata) > 0:
# The first 4 bytes don't seem to be related to the user # The first 4 bytes don't seem to be related to the user
for x in range(len(zk.attendancedata)): for x in xrange(len(zk.attendancedata)):
if x > 0: if x > 0:
zk.attendancedata[x] = zk.attendancedata[x][8:] zk.attendancedata[x] = zk.attendancedata[x][8:]
attendancedata = b''.join(zk.attendancedata) attendancedata = b''.join(zk.attendancedata)

Loading…
Cancel
Save