8848digital / hrms

Open Source HR and Payroll Software
https://frappe.io/hr
GNU General Public License v3.0
0 stars 1 forks source link

While Create Employee getting error #19

Closed rajnish8848 closed 1 week ago

rajnish8848 commented 2 weeks ago

Information about bug

App Versions

{
    "assets": "0.0.1",
    "crm": "0.0.1",
    "erpnext": "15.50.0",
    "erpnext_india": "0.0.1",
    "exotel_integration": "0.0.1",
    "frappe": "15.52.0",
    "frappe_whatsapp": "1.0.7",
    "helpdesk": "1.3.1",
    "hrms": "15.36.1",
    "india_compliance": "15.15.0",
    "insights": "3.0.0",
    "payments": "0.0.1",
    "projects": "0.0.1",
    "sales_commission": "0.0.1",
    "transportation": "0.0.1"
}

Route

Form/Employee/new-employee-kqufxkeifl

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, 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 50, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1758, 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 345, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 367, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 298, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1106, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 977, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1337, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1321, 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-fbqndcybgq\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"naming_series\":\"HR-EMP-\",\"status\":\"Active\",\"create_user_permission\":1,\"company\":\"Diptab Ventures Private Limited\",\"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\":\"Satya\",\"gender\":\"Male\",\"date_of_birth\":\"2025-01-01\",\"date_of_retirement\":\"2085-01-01\",\"date_of_joining\":\"2025-03-01\",\"employee_number\":\"1234567899\"}",
        "action": "Save"
    },
    "btn": {
        "jQuery370032758588054946291": {
            "events": {
                "click": [
                    {
                        "type": "click",
                        "origType": "click",
                        "guid": 3160,
                        "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)"
}

Module

HR

Version

"assets": "0.0.1", "crm": "0.0.1", "erpnext": "15.50.0", "erpnext_india": "0.0.1", "exotel_integration": "0.0.1", "frappe": "15.52.0", "frappe_whatsapp": "1.0.7", "helpdesk": "1.3.1", "hrms": "15.36.1", "india_compliance": "15.15.0", "insights": "3.0.0", "payments": "0.0.1", "projects": "0.0.1", "sales_commission": "0.0.1",

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

Code of Conduct

balamurugan8848 commented 1 week ago

@hrishikesh8848 @Satya8848

hrishikesh8848 commented 1 week ago

@balamurugan8848 this is fixed

balamurugan8848 commented 1 week ago

@hrishikesh8848 closing the issue.