brotherton-erpnext/patches/february_2013/p05_leave_application.py

12 lines
470 B
Python
Raw Normal View History

2013-11-20 07:29:58 +00:00
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import webnotes
def execute():
webnotes.reload_doc("hr", "doctype", "leave_application")
if not webnotes.get_doctype("Leave Application").get({"doctype": "DocField",
"parent": "Leave Application", "permlevel": 2}):
webnotes.conn.sql("""update `tabDocPerm` set permlevel=1
where parent="Leave Application" and permlevel=2""")