brotherton-erpnext/patches/november_2012/leave_application_cleanup.py

9 lines
327 B
Python
Raw Normal View History

2012-11-30 07:11:46 +00:00
import webnotes
def execute():
webnotes.clear_perms("Leave Application")
webnotes.reload_doc("hr", "doctype", "leave_application")
webnotes.conn.sql("""update `tabLeave Application` set status='Approved'
where docstatus=1""")
webnotes.conn.sql("""update `tabLeave Application` set status='Open'
where docstatus=0""")