Added title to Student Admission (#6379)
diff --git a/erpnext/schools/doctype/student_admission/student_admission.json b/erpnext/schools/doctype/student_admission/student_admission.json
index c956085..e757ae1 100644
--- a/erpnext/schools/doctype/student_admission/student_admission.json
+++ b/erpnext/schools/doctype/student_admission/student_admission.json
@@ -95,6 +95,32 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Title",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "publish",
"fieldtype": "Check",
"hidden": 0,
@@ -363,7 +389,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-09-15 05:59:18.435682",
+ "modified": "2016-09-15 07:03:55.581346",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Admission",
@@ -396,6 +422,6 @@
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
- "title_field": "program",
+ "title_field": "title",
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_admission/student_admission.py b/erpnext/schools/doctype/student_admission/student_admission.py
index faf9456..c4384e2 100644
--- a/erpnext/schools/doctype/student_admission/student_admission.py
+++ b/erpnext/schools/doctype/student_admission/student_admission.py
@@ -16,6 +16,10 @@
def get_context(self, context):
context.parents = [{'name': 'admissions', 'title': _('All Student Admissions') }]
+
+ def validate(self):
+ if not self.title:
+ self.title = self.program + " admissions for " + self.academic_year
def get_list_context(context):
context.title = _("Student Admissions")
diff --git a/erpnext/templates/generators/student_admission.html b/erpnext/templates/generators/student_admission.html
index bf138f0..7eb9226 100644
--- a/erpnext/templates/generators/student_admission.html
+++ b/erpnext/templates/generators/student_admission.html
@@ -7,7 +7,7 @@
{% block header %}
-<h1>{{ program }}</h1>
+<h1>{{ title }}</h1>
{% endblock %}
{% block page_content %}
@@ -23,6 +23,10 @@
<table class="table table-bordered" style="margin-top: 20px; width: 30%">
<tr>
+ <th> Program</th>
+ <td>{{ program }} </td>
+ </tr>
+ <tr>
<th> Academic Year</th>
<td>{{ academic_year }} </td>
</tr>