fix: Employee Separation (#25503)

* fix: Employee Separation

- add ignore_mandatory flag for project creation

- form clean-up

* fix: Employee Separation test
This commit is contained in:
Rucha Mahabal
2021-05-03 18:37:00 +05:30
committed by GitHub
parent 1f4df80565
commit f1bdfac7a8
3 changed files with 160 additions and 607 deletions

View File

@@ -32,13 +32,15 @@ class EmployeeBoardingController(Document):
project_name += self.job_applicant
else:
project_name += self.employee
project = frappe.get_doc({
"doctype": "Project",
"project_name": project_name,
"expected_start_date": self.date_of_joining if self.doctype == "Employee Onboarding" else self.resignation_letter_date,
"department": self.department,
"company": self.company
}).insert(ignore_permissions=True)
}).insert(ignore_permissions=True, ignore_mandatory=True)
self.db_set("project", project.name)
self.db_set("boarding_status", "Pending")
self.reload()