print format readonly patch

This commit is contained in:
Anand Doshi 2012-05-16 13:44:06 +05:30
parent f0c3fc47f9
commit 28335b7ee7
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,24 @@
def execute():
"""Make standard print formats readonly for system manager"""
import webnotes.model.doc
new_perms = [
{
'parent': 'Print Format',
'parentfield': 'permissions',
'parenttype': 'DocType',
'role': 'System Manager',
'permlevel': 1,
'read': 1,
},
{
'parent': 'Print Format',
'parentfield': 'permissions',
'parenttype': 'DocType',
'role': 'Administrator',
'permlevel': 1,
'read': 1,
'write': 1
},
]
import webnotes.model.sync
webnotes.model.sync.sync('core', 'print_format')

View File

@ -352,5 +352,10 @@ patch_list = [
'patch_file': 'reload_sales_invoice_pf',
'description': 'Reload sales invoice print formats'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'std_pf_readonly',
'description': 'Make standard print formats readonly for system manager'
},
]