brotherton-erpnext/patches/june_2012/reports_list_permission.py

14 lines
387 B
Python

from __future__ import unicode_literals
def execute():
"""allow read permission to all for report list"""
import webnotes
webnotes.conn.sql("""\
delete from `tabDocPerm`
where parent in ('Report', 'Search Criteria')""")
webnotes.conn.commit()
webnotes.reload_doc('core', 'doctype', 'search_criteria')
webnotes.reload_doc('core', 'doctype', 'report')
webnotes.conn.begin()