brotherton-erpnext/erpnext/patches/v13_0/set_training_event_attendance.py
Anurag Mishra 5670cf4386
feat: enhancements in Training Event (#25782)
* feat: Some Minor fixes

* fix: patch file

* fix: patch

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2021-05-24 20:24:20 +05:30

9 lines
392 B
Python

from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('hr', 'doctype', 'training_event')
frappe.reload_doc('hr', 'doctype', 'training_event_employee')
frappe.db.sql("update `tabTraining Event Employee` set `attendance` = 'Present'")
frappe.db.sql("update `tabTraining Event Employee` set `is_mandatory` = 1 where `attendance` = 'Mandatory'")