Resolving some issues in school [ issue no:- #10464 ] (#10529)

* guardian_name issue fix

* guardian table issue resolved

* resolved fetching issue + unnecessary code removed
This commit is contained in:
Zarrar 2017-08-24 16:22:06 +05:30 committed by Makarand Bauskar
parent 3da5574d79
commit 1010a2a2a4
3 changed files with 12 additions and 24 deletions

View File

@ -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");
}
});
});

View File

@ -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");
}
});
});

View File

@ -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",