brotherton-erpnext/patches/june_2012/reports_list_permission.py

15 lines
403 B
Python
Raw Normal View History

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()
import webnotes.model.sync
webnotes.model.sync.sync('core', 'search_criteria')
webnotes.model.sync.sync('core', 'report')
webnotes.conn.begin()