Browse Source
Merge branch 'CybroOdoo:14.0' into 14.0
pull/298/head
Eric Fairon
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
8 deletions
-
hr_zk_attendance/__manifest__.py
-
hr_zk_attendance/models/zk_machine.py
|
|
@ -21,7 +21,7 @@ |
|
|
|
################################################################################### |
|
|
|
{ |
|
|
|
'name': 'Biometric Device Integration', |
|
|
|
'version': '14.0.1.0.0', |
|
|
|
'version': '14.0.1.0.1', |
|
|
|
'summary': """Integrating Biometric Device (Model: ZKteco uFace 202) With HR Attendance (Face + Thumb)""", |
|
|
|
'description': """This module integrates Odoo with the biometric device(Model: ZKteco uFace 202),odoo13,odd,hr,attendance""", |
|
|
|
'category': 'Generic Modules/Human Resources', |
|
|
|
|
|
@ -31,6 +31,7 @@ from struct import unpack |
|
|
|
from odoo import api, fields, models |
|
|
|
from odoo import _ |
|
|
|
from odoo.exceptions import UserError, ValidationError |
|
|
|
|
|
|
|
_logger = logging.getLogger(__name__) |
|
|
|
try: |
|
|
|
from zk import ZK, const |
|
|
@ -156,7 +157,7 @@ class ZkMachine(models.Model): |
|
|
|
for uid in user: |
|
|
|
if uid.user_id == each.user_id: |
|
|
|
get_user_id = self.env['hr.employee'].search( |
|
|
|
[('device_id', '=', each.user_id)]) |
|
|
|
[('device_id', '=', each.user_id)], limit=1) |
|
|
|
if get_user_id: |
|
|
|
duplicate_atten_ids = zk_attendance.search( |
|
|
|
[('device_id', '=', each.user_id), ('punching_time', '=', atten_time)]) |
|
|
|