addchild will never save added doc

This commit is contained in:
Anand Doshi
2012-12-24 17:02:38 +05:30
parent acc36be87f
commit f5d90abe92
27 changed files with 386 additions and 376 deletions

View File

@@ -7,7 +7,7 @@ def execute():
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 = addchild(appr.doc, 'permissions', 'DocPerm')
ch.permlevel = 0
ch.role = 'Employee'
ch.read = 1

View File

@@ -11,7 +11,7 @@ def execute():
addr = get_obj('DocType', 'Address', with_children=1)
for d in role1+role2:
ch = addchild(addr.doc, 'permissions', 'DocPerm', 0)
ch = addchild(addr.doc, 'permissions', 'DocPerm')
ch.role = d
ch.read = 1
ch.write = 1