diff --git a/erpnext/schools/doctype/student/student.js b/erpnext/schools/doctype/student/student.js index d3d248b2cbf..cadf272a1f8 100644 --- a/erpnext/schools/doctype/student/student.js +++ b/erpnext/schools/doctype/student/student.js @@ -3,6 +3,11 @@ frappe.ui.form.on('Student', { setup: function(frm) { + frm.add_fetch("guardian", "guardian_name", "guardian_name"); + frm.add_fetch("student", "title", "full_name"); + frm.add_fetch("student", "gender", "gender"); + frm.add_fetch("student", "date_of_birth", "date_of_birth"); + frm.set_query("student", "siblings", function(doc, cdt, cdn) { return { "filters": { @@ -11,18 +16,4 @@ frappe.ui.form.on('Student', { }; }) } -}); - -frappe.ui.form.on("Student Guardian", { - guardian: function(frm) { - frm.add_fetch("guardian", "guardian_name", "guardian_name"); - } -}); - -frappe.ui.form.on('Student Sibling', { - student: function(frm) { - frm.add_fetch("student", "title", "full_name"); - frm.add_fetch("student", "gender", "gender"); - frm.add_fetch("student", "date_of_birth", "date_of_birth"); - } -}); +}); \ No newline at end of file diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.js b/erpnext/schools/doctype/student_applicant/student_applicant.js index 9b08ee5f6ab..40a6ac3a3de 100644 --- a/erpnext/schools/doctype/student_applicant/student_applicant.js +++ b/erpnext/schools/doctype/student_applicant/student_applicant.js @@ -39,15 +39,12 @@ frappe.ui.form.on("Student Applicant", { method: "erpnext.schools.api.enroll_student", frm: frm }) - } -}); + }, - -frappe.ui.form.on('Student Sibling', { - student: function(frm) { + setup: function(frm) { + frm.add_fetch("guardian", "guardian_name", "guardian_name"); frm.add_fetch("student", "title", "full_name"); frm.add_fetch("student", "gender", "gender"); frm.add_fetch("student", "date_of_birth", "date_of_birth"); } -}); - +}); \ No newline at end of file diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.json b/erpnext/schools/doctype/student_applicant/student_applicant.json index 271f873195a..578f84ceff5 100644 --- a/erpnext/schools/doctype/student_applicant/student_applicant.json +++ b/erpnext/schools/doctype/student_applicant/student_applicant.json @@ -881,7 +881,7 @@ "in_standard_filter": 0, "label": "Guardians", "length": 0, - "no_copy": 1, + "no_copy": 0, "options": "Student Guardian", "permlevel": 0, "precision": "", @@ -1058,7 +1058,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-06-30 08:21:50.917086", + "modified": "2017-08-23 06:12:36.996978", "modified_by": "Administrator", "module": "Schools", "name": "Student Applicant",