Skip to content

Conversation

@varshachavan321
Copy link

No description provided.

@KristianLGeorgiev
Copy link

KristianLGeorgiev commented Jul 31, 2024

Error source

When installing the biometric-attendance-sync-tool API for the HR module for ERPNext there is a function that needs to be updated in the file erpnext_sync.py.

App versions

ERPNext v15.31.1
Frappe 15.36.0
HRMS 15.24.0

Outdated API update

The url variable in the function send_to_erpnext(....) needs to be updated from:

def send_to_erpnext(employee_field_value, timestamp, device_id=None, log_type=None):
    """
    Example: send_to_erpnext('12349',datetime.datetime.now(),'HO1','IN')
    """
    url = config.ERPNEXT_URL + "/api/method/hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field"
    headers = {
        'Authorization': "token "+ config.ERPNEXT_API_KEY + ":" + config.ERPNEXT_API_SECRET,
        'Accept': 'application/json'    
    }
...

To:

def send_to_erpnext(employee_field_value, timestamp, device_id=None, log_type=None):
    """
    Example: send_to_erpnext('12349',datetime.datetime.now(),'HO1','IN')
    """
    url = config.ERPNEXT_URL + "/api/method/hrms.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field"
    headers = {
        'Authorization': "token "+ config.ERPNEXT_API_KEY + ":" + config.ERPNEXT_API_SECRET,
        'Accept': 'application/json'    
    }
...

@karthikeyan5
Copy link
Contributor

2d23bc0

this change has already been made in the above commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants