print format readonly patch
This commit is contained in:
parent
f0c3fc47f9
commit
28335b7ee7
24
erpnext/patches/may_2012/std_pf_readonly.py
Normal file
24
erpnext/patches/may_2012/std_pf_readonly.py
Normal 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')
|
@ -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'
|
||||
},
|
||||
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user