fixed conflict

This commit is contained in:
Nabin Hait 2012-09-24 15:46:55 +05:30
commit 9ed7b8bb75
2 changed files with 19 additions and 0 deletions

View File

@ -588,6 +588,10 @@ patch_list = [
'patch_module': 'patches.september_2012',
'patch_file': 'plot_patch',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'event_permission',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'repost_stock',

View File

@ -0,0 +1,15 @@
import webnotes
from webnotes.model.code import get_obj
from webnotes.model.doc import addchild
def execute():
existing = webnotes.conn.sql("""select name from `tabDocPerm`
where permlevel=0 and parent='Event' and role='System Manager'
and cancel=1""")
if not existing:
ev_obj = get_obj("DocType", "Event", with_children=1)
ch = addchild(ev_obj.doc, "permissions", "DocPerm")
ch.permlevel = 0
ch.role = 'System Manager'
ch.read = ch.write = ch.create = ch.cancel = 1
ch.save()