[fix] Issue #6046 group_name replaced with name

This commit is contained in:
Revant Nandgaonkar 2016-08-10 11:06:31 +05:30
parent 88fff46ab4
commit 5bbc68df8b
2 changed files with 4 additions and 4 deletions

View File

@ -14,9 +14,9 @@ def get_sg_list(doctype, txt, filters, limit_start, limit_page_length=20):
user = frappe.session.user
student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
if student:
return frappe.db.sql('''select group_name, course, academic_term, academic_year, SG.name from `tabStudent Group`
as SG, `tabStudent Group Student` as SGS where SG.group_name = SGS.parent and SGS.student = %s
order by SG.group_name asc limit {0} , {1}'''.format(limit_start, limit_page_length), student, as_dict=True)
return frappe.db.sql('''select course, academic_term, academic_year, SG.name from `tabStudent Group`
as SG, `tabStudent Group Student` as SGS where SG.name = SGS.parent and SGS.student = %s
order by SG.name asc limit {0} , {1}'''.format(limit_start, limit_page_length), student, as_dict=True)
def get_list_context(context=None):
return {

View File

@ -5,7 +5,7 @@
{{ doc.course }}
</div>
<div class="col-xs-3">
{{ doc.group_name }}
{{ doc.name }}
</div>
<div class="col-xs-2">
{{doc.academic_term }}