Get return target_doc from make_open_doc method

I have doctype A contain link to doctype B.
I custom a button to generate doctype B and want to set A.b = target_doc.
Thank everybody :slight_smile:
client side

if ((frm.doc.salary_structure) && (frm.doc.docstatus === 1) && frm.doc.employee) {				
			frm.add_custom_button(__('Salary structure Assignment'), function () {
					method: "",
					frm: frm,
			}, __("Make"));

sever side

def make_salary_structure_assignment(source_name, target_doc=None):
	doc = frappe.get_doc("Employee Onboarding", source_name)
	target_doc = get_mapped_doc("Employee Onboarding", source_name, {
			"Employee Onboarding": {
				"doctype": "Salary Structure Assignment",
				"field_map": {
					"base": "base",
					"from_date": "from_date",
					"employee": "employee"
		}, target_doc)
	doc.salary_structure_assignment =
	return target_doc