mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
addchild will never save added doc
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user