Update employee.py

This commit is contained in:
Manas Solanki 2018-05-25 14:46:21 +05:30 committed by GitHub
parent f87ec61043
commit 730cb3b547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"])
frappe.db.add_index("Employee", ["lft", "rgt"])