minor fix
This commit is contained in:
parent
1e3a0b4632
commit
08847bd06a
@ -74,15 +74,15 @@ def make_attendance_records(student, student_name, status, course_schedule=None,
|
||||
:param course_schedule: Course Schedule.
|
||||
:param status: Status (Present/Absent)
|
||||
"""
|
||||
student_attendance = frappe.db.get_value("Student Attendance", filters = {
|
||||
student_attendance_list = frappe.get_list("Student Attendance", fields = ['name'], filters = {
|
||||
"student": student,
|
||||
"course_schedule": course_schedule,
|
||||
"student_batch": student_batch,
|
||||
"date": date
|
||||
})
|
||||
|
||||
if student_attendance:
|
||||
student_attendance = frappe.get_doc("Student Attendance", student_attendance)
|
||||
if student_attendance_list:
|
||||
student_attendance = frappe.get_doc("Student Attendance", student_attendance_list[0])
|
||||
else:
|
||||
student_attendance = frappe.new_doc("Student Attendance")
|
||||
student_attendance.student = student
|
||||
|
@ -121,7 +121,7 @@ schools.StudentsEditor = Class.extend({
|
||||
return !stud.disabled && !stud.checked;
|
||||
});
|
||||
|
||||
frappe.confirm(__("Do you want to save attendance?<br>Present: {0}\
|
||||
frappe.confirm(__("Do you want to update attendance?<br>Present: {0}\
|
||||
<br>Absent: {1}", [students_present.length, students_absent.length]), function() {
|
||||
frappe.call({
|
||||
method: "erpnext.schools.api.mark_attendance",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"allow_copy": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "",
|
||||
"autoname": "field:language_name",
|
||||
"beta": 0,
|
||||
"creation": "2017-02-21 01:55:00.366273",
|
||||
"custom": 0,
|
||||
@ -17,7 +17,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "student_language",
|
||||
"fieldname": "language_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
@ -26,7 +26,7 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Student Language",
|
||||
"label": "Language Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -52,7 +52,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-02-21 02:23:47.196351",
|
||||
"modified": "2017-02-22 13:03:48.600707",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Student Language",
|
||||
|
@ -7,6 +7,4 @@ import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class StudentLanguage(Document):
|
||||
|
||||
def validate(self):
|
||||
self.name = self.student_language
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user