This commit is contained in:
Manas Solanki 2017-04-25 13:22:44 +05:30 committed by Nabin Hait
parent c61dc9c7ea
commit d7afa69c6f
2 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,8 @@ frappe.ui.form.on("Assessment Plan", {
if (frm.doc.docstatus == 1) {
frm.add_custom_button(__("Assessment Result"), function() {
frappe.route_options = {
assessment_plan: frm.doc.name
assessment_plan: frm.doc.name,
student_batch: frm.doc.student_batch
}
frappe.set_route("Form", "Assessment Result Tool");
});

View File

@ -8,6 +8,8 @@ cur_frm.add_fetch("assessment_plan", "student_batch", "student_batch");
frappe.ui.form.on('Assessment Result Tool', {
refresh: function(frm) {
if (frappe.route_options) {
frm.set_value("student_batch", frappe.route_options.student_batch);
frm.set_value("assessment_plan", frappe.route_options.assessment_plan);
frappe.route_options = null;
}
frm.disable_save();