fix: boarding status in Employee Onboarding and Separation

- make boarding status read-only as its dependent on project

- update boarding status in onboarding/separation on project update

- update tests to check status changes
This commit is contained in:
Rucha Mahabal
2021-06-03 18:07:00 +05:30
parent 3d5e15284b
commit 67519d6b79
8 changed files with 130 additions and 135 deletions

View File

@@ -14,6 +14,7 @@ from erpnext.hr.doctype.daily_work_summary.daily_work_summary import get_users_e
from erpnext.hr.doctype.holiday_list.holiday_list import is_holiday
from frappe.model.document import Document
from erpnext.education.doctype.student_attendance.student_attendance import get_holiday_list
from erpnext.hr.utils import update_employee_boarding_status
class Project(Document):
def get_feed(self):
@@ -37,6 +38,7 @@ class Project(Document):
self.send_welcome_email()
self.update_costing()
self.update_percent_complete()
update_employee_boarding_status(self)
def copy_from_template(self):
'''
@@ -132,6 +134,7 @@ class Project(Document):
def update_project(self):
'''Called externally by Task'''
self.update_percent_complete()
update_employee_boarding_status(self)
self.update_costing()
self.db_update()