mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-16 10:20:31 +00:00
Merge branch 'shf_rename'
This commit is contained in:
@@ -49,5 +49,5 @@ class DocType:
|
||||
if res:
|
||||
if res[0][1]:
|
||||
msgprint("POS Setting '%s' already created for user: '%s' and company: '%s'"%(res[0][0], res[0][1], self.doc.company), raise_exception=1)
|
||||
else:
|
||||
msgprint("Global POS Setting already created - %s for this company: '%s'" % (res[0][0], self.doc.company), raise_exception=1)
|
||||
else:
|
||||
msgprint("Global POS Setting already created - %s for this company: '%s'" % (res[0][0], self.doc.company), raise_exception=1)
|
||||
|
||||
30
erpnext/patches/may_2012/std_pf_readonly.py
Normal file
30
erpnext/patches/may_2012/std_pf_readonly.py
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
},
|
||||
]
|
||||
for perms in new_perms:
|
||||
doc = webnotes.model.doc.Document('DocPerm')
|
||||
doc.fields.update(perms)
|
||||
doc.save()
|
||||
webnotes.conn.commit()
|
||||
webnotes.conn.begin()
|
||||
import webnotes.model.sync
|
||||
webnotes.model.sync.sync('core', 'print_format')
|
||||
@@ -357,5 +357,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'
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user