How to configure and setup the fingerprint device IP Address in ERP Next.
You have 2 options to do this .
- Make one whitelist function in erpnext that accept data from your bio-metric device. When punch in-out one API call trigger from device that call this whitelist function and in whitelist function you can write your logic.
- Make one API function your bio-metric side where you pass date and get all attendance information of that date or you can set one scheduler that call everyday and put attandance information in erp.
I am new in ERPNext. I donât know how to create whitelist function and where to store. Is there any link available?
It shows error while running the script,
Thanks for your comment. I will check.
Can anyone share a working whitelist script sample? Would really appreciate it. I have a Hikvision Access Control system and i would love to integrate it to the biometric attendance module but i am kinda lost as to how to create the whitelist. I checked the article above but it didnât help a noob like me.
@flexy2ky as far as bio-metric integration goes, you might not have to create a new whitelisted function. This already exists in the âEmployee Checkinâ DocType.
The function is called âadd_log_based_on_employee_field
â.
This function can be accessed via the URL: /api/method/erpnext.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field
In case you need an example of how to use this whitelisted function you can refer to it here: biometric-attendance-sync-tool/push_to_erpnext.py at 6fd922ceb9a41289c04281273d35d5ad7b79f044 ¡ frappe/biometric-attendance-sync-tool ¡ GitHub
@Maheshwari_Bhavesh, please note that the whitelisted function that you are recommending to write already exists. Also, ERPNext now handles the part of converting the IN/OUT time logs to attendance. Please refer to the Auto Attendance feature for the same.
I wish i could interpret these information. Iâm as nooby as noob can get.
where you put this codeâŚ
@IT_Design, this script needs to be installed in any of the computer that has IP Network access to your bio-metric device(i.e most probably on a machine that is on the same LAN network as your bio-metric device).
Not ABLE TO RUN push_to_erpnext.py.
HOW I CAN RUN THAT AND WHERE TO RUN IT
ile âpush_to_erpnext.pyâ, line 42
def pull_process_and_push_data(device, device_attendance_logs=None):
^
This is te error which is coming to me when i am running " push_to_erpnext.py"
Dear @karthikeyan5 thanks very much for sharing the script. I have one issue when running the script which is
frappe.throw(_("No Employee found for the given employee field value. '{}': {}").format(employee_fieldname,employee_field_value))
Dear @Anmol_b1994, @IT_Design and others
-
Install Python Latest Version. See tutorial from https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server
-
Install GIT from https://git-scm.com/download/win
-
From the Windows Command Prompt, create a directory and move to that folder
mkdir biometric
cd biometric -
Then follow the instructions fromhttps://github.com/frappe/push-biometric-erpnext
@Riyas_Rawther, I hope you have already solved this issueâŚ
Anyways here is what seems to be wrong with your setup:
- You seem to have not set the Attendance device ID in the Employee document.
To fix this do the following:
- goto âEmployeeâ > âATTENDANCE AND LEAVE DETAILSâ > âAttendance Device ID (Biometric/RF tag ID)â field⌠and set the ID from your biometric device for that employeeâŚ
BTW, thanks for sharing some additional steps to follow for the community.
does this work on multi-tenant server?
Should work on a multi-tenant server since you are accessing the erp site via URL/site name.