mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
moved directory structure
This commit is contained in:
15
patches/april_2012/update_appraisal_permission.py
Normal file
15
patches/april_2012/update_appraisal_permission.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import unicode_literals
|
||||
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()
|
||||
Reference in New Issue
Block a user