update permission in appraisal

This commit is contained in:
Nabin Hait 2012-04-24 13:32:26 +05:30
parent 9a6dbfca8f
commit 3afecb9e30
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,14 @@
def execute():
import webnotes
from webnotes.model.doc import addchild
from webnotes.model.code import get_obj
webnotes.conn.sql("delete from `tabDocPerm` where role = 'All' and permlevel = 0 and parent in ('Appraisal', 'Ticket', 'Project')")
appr = get_obj('DocType', 'Appraisal', with_children=1)
ch = addchild(appr.doc, 'permissions', 'DocPerm', 0)
ch.permlevel = 0
ch.role = 'Employee'
ch.read = 1
ch.write = 1
ch.save()

View File

@ -242,5 +242,10 @@ patch_list = [
'patch_file': 'update_permlevel_in_address',
'description': 'updated permlevel in address'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'update_appraisal_permission',
'description': 'updated permission in appraisal'
},
]