From ae30026005f8fc898ba8b1e9838e58d355097adc Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Mon, 17 Apr 2017 11:52:35 +0530 Subject: [PATCH] Calender view fix for course schedule --- erpnext/config/schools.py | 2 +- erpnext/schools/doctype/course/course.js | 12 ------------ erpnext/schools/doctype/program/program.js | 15 --------------- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py index b498f50099..c88a8ccf4b 100644 --- a/erpnext/config/schools.py +++ b/erpnext/config/schools.py @@ -106,7 +106,7 @@ def get_data(): { "type": "doctype", "name": "Course Schedule", - "route": "Calendar/Course Schedule" + "route": "List/Course Schedule/Calendar" }, { "type": "doctype", diff --git a/erpnext/schools/doctype/course/course.js b/erpnext/schools/doctype/course/course.js index 284658f23d..f84c59fcd2 100644 --- a/erpnext/schools/doctype/course/course.js +++ b/erpnext/schools/doctype/course/course.js @@ -1,30 +1,18 @@ frappe.ui.form.on("Course", "refresh", function(frm) { if(!cur_frm.doc.__islocal) { frm.add_custom_button(__("Program"), function() { - // frappe.route_options = { - // "Program Course.course": frm.doc.name - // } frappe.set_route("List", "Program"); }); frm.add_custom_button(__("Student Group"), function() { - // frappe.route_options = { - // course: frm.doc.name - // } frappe.set_route("List", "Student Group"); }); frm.add_custom_button(__("Course Schedule"), function() { - // frappe.route_options = { - // course: frm.doc.name - // } frappe.set_route("List", "Course Schedule"); }); frm.add_custom_button(__("Assessment Plan"), function() { - // frappe.route_options = { - // course: frm.doc.name - // } frappe.set_route("List", "Assessment Plan"); }); } diff --git a/erpnext/schools/doctype/program/program.js b/erpnext/schools/doctype/program/program.js index c251f1e005..cc09d0ef4d 100644 --- a/erpnext/schools/doctype/program/program.js +++ b/erpnext/schools/doctype/program/program.js @@ -6,37 +6,22 @@ cur_frm.add_fetch('fee_structure', 'total_amount', 'amount'); frappe.ui.form.on("Program", "refresh", function(frm) { if(!frm.doc.__islocal) { frm.add_custom_button(__("Student Applicant"), function() { - // frappe.route_options = { - // program: frm.doc.name - // } frappe.set_route("List", "Student Applicant"); }); frm.add_custom_button(__("Program Enrollment"), function() { - // frappe.route_options = { - // program: frm.doc.name - // } frappe.set_route("List", "Program Enrollment"); }); frm.add_custom_button(__("Student Group"), function() { - // frappe.route_options = { - // program: frm.doc.name - // } frappe.set_route("List", "Student Group"); }); frm.add_custom_button(__("Fee Structure"), function() { - // frappe.route_options = { - // program: frm.doc.name - // } frappe.set_route("List", "Fee Structure"); }); frm.add_custom_button(__("Fees"), function() { - // frappe.route_options = { - // program: frm.doc.name - // } frappe.set_route("List", "Fees"); }); }