diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index 824ddf5aa7f..aaa5930fdd3 100755 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -168,7 +168,7 @@ class Employee(NestedSet): def validate_onboarding_process(self): employee_onboarding = frappe.get_all("Employee Onboarding", - filters={"job_applicant": self.job_applicant, "docstatus": 1, "status": ("!=", "Completed")}) + filters={"job_applicant": self.job_applicant, "docstatus": 1, "boarding_status": ("!=", "Completed")}) if employee_onboarding: doc = frappe.get_doc("Employee Onboarding", employee_onboarding[0].name) doc.validate_employee_creation() @@ -341,4 +341,4 @@ def get_children(doctype, parent=None, company=None, is_root=False, is_tree=Fals def on_doctype_update(): - frappe.db.add_index("Employee", ["lft", "rgt"]) \ No newline at end of file + frappe.db.add_index("Employee", ["lft", "rgt"])