From f869a679ae2a3a6e63b584a5563a81ebb7fdcd21 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Tue, 21 Feb 2017 11:34:30 +0530 Subject: [PATCH] Fixed Student Attendence --- erpnext/patches.txt | 1 + .../v7_2/update_attendance_docstatus.py | 10 + erpnext/public/js/schools/student_button.html | 5 +- erpnext/schools/api.py | 16 +- .../student_applicant/student_applicant.json | 5 +- .../student_attendance.json | 12 +- .../student_attendance_tool.js | 246 +++++++++--------- .../student_attendance_tool.json | 13 +- .../student_attendance_tool.py | 5 +- 9 files changed, 172 insertions(+), 141 deletions(-) create mode 100644 erpnext/patches/v7_2/update_attendance_docstatus.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 7d0ac97560..ea205b01cc 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -375,3 +375,4 @@ erpnext.patches.v7_2.setup_auto_close_settings erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component erpnext.patches.v7_2.rename_att_date_attendance +erpnext.patches.v7_2.update_attendance_docstatus \ No newline at end of file diff --git a/erpnext/patches/v7_2/update_attendance_docstatus.py b/erpnext/patches/v7_2/update_attendance_docstatus.py new file mode 100644 index 0000000000..6fbab019f5 --- /dev/null +++ b/erpnext/patches/v7_2/update_attendance_docstatus.py @@ -0,0 +1,10 @@ +import frappe + +def execute(): + frappe.reload_doctype('Student Attendance') + # frappe.reload_doc("schools", "doctype", "student_attendance") + frappe.db.sql(''' + update `tabStudent Attendance` set + docstatus=0 + where + docstatus=1''') \ No newline at end of file diff --git a/erpnext/public/js/schools/student_button.html b/erpnext/public/js/schools/student_button.html index dabaf2660e..4196808355 100644 --- a/erpnext/public/js/schools/student_button.html +++ b/erpnext/public/js/schools/student_button.html @@ -1,5 +1,5 @@
-
+