minor fix
diff --git a/erpnext/hr/doctype/employee/employee_dashboard.py b/erpnext/hr/doctype/employee/employee_dashboard.py
index 0f95020..e1e1fce 100644
--- a/erpnext/hr/doctype/employee/employee_dashboard.py
+++ b/erpnext/hr/doctype/employee/employee_dashboard.py
@@ -25,6 +25,10 @@
{
'label': _('Evaluation'),
'items': ['Appraisal']
+ },
+ {
+ 'label': _('Employee Lifecycle'),
+ 'items': ['Employee Transfer', 'Employee Promotion']
}
]
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_transfer/employee_transfer.py b/erpnext/hr/doctype/employee_transfer/employee_transfer.py
index d80e293..b58d334 100644
--- a/erpnext/hr/doctype/employee_transfer/employee_transfer.py
+++ b/erpnext/hr/doctype/employee_transfer/employee_transfer.py
@@ -13,6 +13,8 @@
def validate(self):
if frappe.get_value("Employee", self.employee, "status") == "Left":
frappe.throw(_("Cannot transfer Employee with status Left"))
+ if self.new_company and self.company == self.new_company:
+ frappe.throw_("New Company must be different from current company")
def before_submit(self):
if getdate(self.transfer_date) > getdate():
@@ -23,6 +25,8 @@
employee = frappe.get_doc("Employee", self.employee)
if self.create_new_employee_id:
new_employee = frappe.copy_doc(employee)
+ new_employee.name = None
+ new_employee.employee_number = None
new_employee = update_employee(new_employee, self.transfer_details)
if self.new_company:
new_employee.company = self.new_company