added 'report' permission

This commit is contained in:
Rushabh Mehta 2013-01-10 17:11:48 +05:30
parent 9dbb761f19
commit 1d2710d54d
2 changed files with 14 additions and 0 deletions

View 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""")

View File

@ -582,4 +582,8 @@ patch_list = [
'patch_module': 'patches.january_2013',
'patch_file': 'holiday_list_patch',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'report_permission',
},
]