fix: fetch sales person name (#20805)

* fix: fetch sales person name

* Update sales_person.js

Co-authored-by: pinka0925 <44537026+pinka0925@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
diff --git a/erpnext/setup/doctype/sales_person/sales_person.js b/erpnext/setup/doctype/sales_person/sales_person.js
index 9ff37fa..89ca4a9 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.js
+++ b/erpnext/setup/doctype/sales_person/sales_person.js
@@ -19,6 +19,11 @@
 				}
 			}
 		};
+	
+		frm.make_methods = {
+			'Sales Order': () => frappe.new_doc("Sales Order")
+				.then(() => frm.add_child("sales_team", {"sales_person": frm.doc.name}))
+		}
 	}
 });