mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
added 'report' permission
This commit is contained in:
10
patches/january_2013/report_permission.py
Normal file
10
patches/january_2013/report_permission.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import webnotes
|
||||
def execute():
|
||||
webnotes.reload_doc("core", "doctype", "docperm")
|
||||
webnotes.conn.sql("""update tabDocPerm set `report`=`write`""")
|
||||
webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`report`=0
|
||||
where tabDocPerm.`parent` = tabDocType.name
|
||||
and ifnull(tabDocType.issingle,0) = 1""")
|
||||
webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`submit`=0
|
||||
where tabDocPerm.`parent` = tabDocType.name
|
||||
and ifnull(tabDocType.is_submittable,0) = 0""")
|
||||
Reference in New Issue
Block a user