Hi @Jithin_K_T,
Can you elaborate the issue and what issue you are facing?
click “Copy error to clipboard” and paste it here, for the understanding.
App Versions
{
"erpnext": "15.15.0",
"frappe": "15.16.1",
"hrms": "16.0.0-dev"
}
Route
Form/Employee/new-employee-xepurdqvwv
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1697, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 331, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 353, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 285, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1084, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 955, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1315, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1299, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File "apps/hrms/hrms/overrides/employee_master.py", line 31, in validate_onboarding_process
if not doc.job_applicant:
AttributeError: 'EmployeeMaster' object has no attribute 'job_applicant'
Request Data
{
"type": "POST",
"args": {
"doc": "{\"docstatus\":0,\"doctype\":\"Employee\",\"name\":\"new-employee-xepurdqvwv\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"helpdesk@xpayback.com\",\"naming_series\":\"HR-EMP-\",\"status\":\"Active\",\"create_user_permission\":1,\"company\":\"XpayBack\",\"prefered_contact_email\":\"\",\"unsubscribed\":0,\"current_accommodation_type\":\"\",\"permanent_accommodation_type\":\"\",\"salary_currency\":\"INR\",\"salary_mode\":\"\",\"marital_status\":\"\",\"blood_group\":\"\",\"education\":[],\"external_work_history\":[],\"internal_work_history\":[],\"leave_encashed\":\"\",\"first_name\":\"demo-user\",\"gender\":\"Male\",\"date_of_joining\":\"2024-03-06\",\"date_of_birth\":\"2023-05-04\",\"date_of_retirement\":\"2083-05-04\"}",
"action": "Save"
},
"btn": {
"jQuery3700346802846880192031": {
"events": {
"click": [
{
"type": "click",
"origType": "click",
"guid": 1074,
"namespace": ""
}
]
}
}
},
"freeze": true,
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.save.savedocs",
"request_id": null
}
Response Data
{
"exception": "AttributeError: 'EmployeeMaster' object has no attribute 'job_applicant'",
"exc_type": "AttributeError",
"_exc_source": "hrms (app)"
}
This happens while creating an employee. I have installed it using How to Install ERPNext Version 14 in Ubuntu 22.04 - A step by Step Guide - Code with Karani
How to fix it?
@Jithin_K_T While installing the apps the bench must be in running. Otherwise some doctypes are not installed properly. So try to remove that hrms app and install it again.
Ok let me try that. Thank you for the reply
While doing this , ensure that bench is running.
Okay. After doing those things, let me know that is resolved or not.
No joy
To uninstall app : 1. bench --site sitename uninstall-app appname
2. Remove that folder from apps directory
To install app : 1. bench get-app hrms
2. bench --site hilltop install-app hrms
Alright, I did not remove hrms directory, let me try that
Make sure bench is in start mode
frappe@ip-172-31-43-98:~/frappe-bench$ sudo supervisorctl status
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 27542, uptime 5 days, 20:44:46
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 27543, uptime 5 days, 20:44:46
frappe-bench-web:frappe-bench-frappe-web RUNNING pid 45326, uptime 0:14:23
frappe-bench-web:frappe-bench-node-socketio FATAL Exited too quickly (process log may have details)
frappe-bench-workers:frappe-bench-frappe-long-worker-0 RUNNING pid 27548, uptime 5 days, 20:44:46
frappe-bench-workers:frappe-bench-frappe-schedule RUNNING pid 27546, uptime 5 days, 20:44:46
frappe-bench-workers:frappe-bench-frappe-short-worker-0 RUNNING pid 27547, uptime 5 days, 20:44:46
Is that it?
Open terminal and goto frappebench directory and type “bench start” and press enter.
Now open another window in terminal , goto your apps directory and do ::
To uninstall app : 1. bench --site sitename uninstall-app appname
2. Remove that folder from apps directory
To install app : 1. bench get-app hrms
2. bench --site hilltop install-app hrms
I got it. but what is sudo supervisorctl status for ?
It is used to check the status of processes managed by Supervisor
It shows bench is already running
if you erpnext installed it in version 15 then hrms must be in version 15.
If hrms is in the develop branch then apply it.
bench switch-to-branch version-15 hrms
If uninstalled or install the app then apply it.
bench get-app --branch version-15 hrms
Thank You!
Great ! Oh yeah ok let me do that.
It did not work. broke everything. Let me reinstall.