Files
schuetz3-erpnext/erpnext/patches/v13_0/set_training_event_attendance.py
Ankush Menat c07713b860 style: bulk format code with black
v13 port because otherwise backports will result in conflicts always
2022-03-29 17:29:34 +05:30

12 lines
347 B
Python

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'"
)