[Fix] fixed routing to the assessment result

This commit is contained in:
Manas Solanki 2017-04-21 16:13:17 +05:30 committed by Nabin Hait
parent e713a7d840
commit 8230ce095f
2 changed files with 9 additions and 1 deletions

View File

@ -8,7 +8,7 @@ cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
frappe.ui.form.on("Assessment Plan", {
refresh: function(frm) {
if (!frm.doc.__islocal) {
if (frm.doc.docstatus == 1) {
frm.add_custom_button(__("Assessment Result"), function() {
frappe.route_options = {
assessment_plan: frm.doc.name

View File

@ -5,6 +5,14 @@ cur_frm.add_fetch("assessment_plan", "student_group", "student_group");
cur_frm.add_fetch("assessment_plan", "student_batch", "student_batch");
frappe.ui.form.on('Assessment Result Tool', {
onload: function(frm) {
if (frappe.route_options) {
frm.doc.assessment_plan = frappe.route_options.assessment_plan;
frappe.route_options = null;
}
},
refresh: function(frm) {
frm.disable_save();
frm.page.clear_indicator();