diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index 28ba6cebdef..a21baa74893 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -453,6 +453,17 @@ class TestTimesheet(ERPNextTestSuite): rate = get_timesheet_detail_rate(detail.name, timesheet.currency) self.assertEqual(rate, detail.billing_amount) + def test_title_follows_employee(self): + first = make_employee("_test_timesheet_title_one@example.com", company="_Test Company") + second = make_employee("_test_timesheet_title_two@example.com", company="_Test Company") + + timesheet = make_timesheet(first, simulate=True, do_not_submit=True) + self.assertEqual(timesheet.get_title(), frappe.db.get_value("Employee", first, "employee_name")) + + timesheet.employee = second + timesheet.save() + self.assertEqual(timesheet.get_title(), frappe.db.get_value("Employee", second, "employee_name")) + @staticmethod def _delete_if_exists(doctype, name): if frappe.db.exists(doctype, name): diff --git a/erpnext/projects/doctype/timesheet/timesheet.json b/erpnext/projects/doctype/timesheet/timesheet.json index a703e6cd07f..ea50e074dbe 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.json +++ b/erpnext/projects/doctype/timesheet/timesheet.json @@ -49,7 +49,6 @@ "fields": [ { "allow_on_submit": 1, - "default": "{employee_name}", "fieldname": "title", "fieldtype": "Data", "hidden": 1, @@ -315,7 +314,7 @@ "idx": 1, "is_submittable": 1, "links": [], - "modified": "2026-04-08 12:43:30.658074", + "modified": "2026-07-30 11:04:12.882140", "modified_by": "Administrator", "module": "Projects", "name": "Timesheet", @@ -409,5 +408,5 @@ "sort_field": "creation", "sort_order": "ASC", "states": [], - "title_field": "title" + "title_field": "employee_name" } diff --git a/erpnext/stock/doctype/material_request/material_request.json b/erpnext/stock/doctype/material_request/material_request.json index 2a455a1437c..1c6d7db5296 100644 --- a/erpnext/stock/doctype/material_request/material_request.json +++ b/erpnext/stock/doctype/material_request/material_request.json @@ -68,7 +68,6 @@ }, { "allow_on_submit": 1, - "default": "{material_request_type}", "fieldname": "title", "fieldtype": "Data", "hidden": 1, @@ -377,7 +376,7 @@ "idx": 70, "is_submittable": 1, "links": [], - "modified": "2026-03-09 17:15:30.124509", + "modified": "2026-07-30 11:04:31.517204", "modified_by": "Administrator", "module": "Stock", "name": "Material Request",