Files
erpnext/patches/april_2013/p04_update_role_in_pages.py
2013-04-09 11:39:16 +05:30

11 lines
265 B
Python

import webnotes
import webnotes.model
def execute():
for p in ["activity", "todo", "questions", "question-view"]:
pbean = webnotes.bean("Page", p)
pbean.doclist.append({
"doctype": "Page Role",
"role": "All",
"parentfield": "roles"
})
pbean.save()