Changes in course and program
This commit is contained in:
parent
346928f2bc
commit
a6d1876958
@ -1,30 +1,30 @@
|
||||
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.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.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.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.route_options = {
|
||||
// course: frm.doc.name
|
||||
// }
|
||||
frappe.set_route("List", "Assessment Plan");
|
||||
});
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:course_name",
|
||||
"autoname": "field:course_code",
|
||||
"beta": 0,
|
||||
"creation": "2015-09-07 12:39:55.181893",
|
||||
"custom": 0,
|
||||
@ -24,7 +25,7 @@
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Course Name",
|
||||
"length": 0,
|
||||
@ -53,7 +54,7 @@
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Course Code",
|
||||
"length": 0,
|
||||
@ -65,6 +66,35 @@
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "parent_course",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Parent Course (Leave blank, if this isn't part of Parent Course)",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
@ -110,7 +140,7 @@
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Course Abbreviation",
|
||||
"length": 0,
|
||||
@ -304,18 +334,18 @@
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2017-02-17 17:22:36.450073",
|
||||
"modified": "2017-04-10 14:54:59.943676",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Course",
|
||||
|
@ -1,43 +1,42 @@
|
||||
// Copyright (c) 2015, Frappe Technologies and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
cur_frm.add_fetch("course", "course_code", "course_code");
|
||||
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.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.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.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.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.route_options = {
|
||||
// program: frm.doc.name
|
||||
// }
|
||||
frappe.set_route("List", "Fees");
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:program_name",
|
||||
@ -82,7 +83,7 @@
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Program Abbreviation",
|
||||
"length": 0,
|
||||
@ -276,18 +277,18 @@
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2017-02-17 17:22:14.107052",
|
||||
"modified": "2017-04-07 17:57:37.392266",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Program",
|
||||
|
@ -7,10 +7,4 @@ import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Program(Document):
|
||||
def validate(self):
|
||||
self.validate_course()
|
||||
|
||||
def validate_course(self):
|
||||
for d in self.courses:
|
||||
if not d.course_code:
|
||||
d.course_code = frappe.db.get_value("Course", d.course, "course_code")
|
||||
pass
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"beta": 0,
|
||||
@ -41,36 +42,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "academic_term",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Academic Term",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Academic Term",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -104,7 +75,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "course_code",
|
||||
"fieldname": "course_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
@ -113,9 +84,10 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Course Code",
|
||||
"label": "Course Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "course.course_name",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@ -140,7 +112,7 @@
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Required",
|
||||
"length": 0,
|
||||
@ -158,18 +130,18 @@
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2017-02-17 17:16:10.315691",
|
||||
"modified": "2017-04-07 17:59:12.504949",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Program Course",
|
||||
|
Loading…
x
Reference in New Issue
Block a user