brotherton-erpnext/patches/january_2013/give_report_permission_on_read.py

8 lines
239 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
import webnotes
def execute():
webnotes.conn.sql("""update tabDocPerm set `report`=`read`
where ifnull(permlevel,0)=0""")