diff --git a/erpnext/setup/doctype/employee/employee.js b/erpnext/setup/doctype/employee/employee.js
index 8d15295..39a215f 100755
--- a/erpnext/setup/doctype/employee/employee.js
+++ b/erpnext/setup/doctype/employee/employee.js
@@ -18,15 +18,6 @@
 		erpnext.toggle_naming_series();
 	}
 
-	date_of_birth() {
-		return cur_frm.call({
-			method: "get_retirement_date",
-			args: {
-				date_of_birth: this.frm.doc.date_of_birth
-			}
-		});
-	}
-
 	salutation() {
 		if (this.frm.doc.salutation) {
 			this.frm.set_value("gender", {
diff --git a/erpnext/setup/doctype/employee/employee.py b/erpnext/setup/doctype/employee/employee.py
index 91e8cf3..84b1e51 100755
--- a/erpnext/setup/doctype/employee/employee.py
+++ b/erpnext/setup/doctype/employee/employee.py
@@ -10,7 +10,7 @@
 	remove_user_permission,
 	set_user_permission_if_allowed,
 )
-from frappe.utils import add_years, cstr, getdate, today, validate_email_address
+from frappe.utils import cstr, getdate, today, validate_email_address
 from frappe.utils.nestedset import NestedSet
 
 from erpnext.utilities.transaction_base import delete_events
@@ -28,18 +28,7 @@
 	nsm_parent_field = "reports_to"
 
 	def autoname(self):
-		naming_method = frappe.db.get_value("HR Settings", None, "emp_created_by")
-		if not naming_method:
-			throw(_("Please setup Employee Naming System in Human Resource > HR Settings"))
-		else:
-			if naming_method == "Naming Series":
-				set_name_by_naming_series(self)
-			elif naming_method == "Employee Number":
-				self.name = self.employee_number
-			elif naming_method == "Full Name":
-				self.set_employee_name()
-				self.name = self.employee_name
-
+		set_name_by_naming_series(self)
 		self.employee = self.name
 
 	def validate(self):
@@ -54,8 +43,6 @@
 		self.validate_status()
 		self.validate_reports_to()
 		self.validate_preferred_email()
-		if self.job_applicant:
-			self.validate_onboarding_process()
 
 		if self.user_id:
 			self.validate_user_details()
@@ -248,30 +235,11 @@
 	def on_trash(self):
 		self.update_nsm_model()
 		delete_events(self.doctype, self.name)
-		if frappe.db.exists("Employee Transfer", {"new_employee_id": self.name, "docstatus": 1}):
-			emp_transfer = frappe.get_doc(
-				"Employee Transfer", {"new_employee_id": self.name, "docstatus": 1}
-			)
-			emp_transfer.db_set("new_employee_id", "")
 
 	def validate_preferred_email(self):
 		if self.prefered_contact_email and not self.get(scrub(self.prefered_contact_email)):
 			frappe.msgprint(_("Please enter {0}").format(self.prefered_contact_email))
 
-	def validate_onboarding_process(self):
-		employee_onboarding = frappe.get_all(
-			"Employee Onboarding",
-			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()
-			doc.db_set("employee", self.name)
-
 	def reset_employee_emails_cache(self):
 		prev_doc = self.get_doc_before_save() or {}
 		cell_number = cstr(self.get("cell_number"))
@@ -281,35 +249,6 @@
 			frappe.cache().hdel("employees_with_number", prev_number)
 
 
-def get_timeline_data(doctype, name):
-	"""Return timeline for attendance"""
-	return dict(
-		frappe.db.sql(
-			"""select unix_timestamp(attendance_date), count(*)
-		from `tabAttendance` where employee=%s
-			and attendance_date > date_sub(curdate(), interval 1 year)
-			and status in ('Present', 'Half Day')
-			group by attendance_date""",
-			name,
-		)
-	)
-
-
-@frappe.whitelist()
-def get_retirement_date(date_of_birth=None):
-	ret = {}
-	if date_of_birth:
-		try:
-			retirement_age = int(frappe.db.get_single_value("HR Settings", "retirement_age") or 60)
-			dt = add_years(getdate(date_of_birth), retirement_age)
-			ret = {"date_of_retirement": dt.strftime("%Y-%m-%d")}
-		except ValueError:
-			# invalid date
-			ret = {}
-
-	return ret
-
-
 def validate_employee_role(doc, method):
 	# called via User hook
 	if "Employee" in [d.role for d in doc.get("roles")]:
