From d35293de17cf6f98217909cd9b0088ff070e4bca Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 9 Apr 2013 11:39:16 +0530 Subject: [PATCH] updated all role in some pages --- patches/april_2013/p04_update_role_in_pages.py | 11 +++++++++++ patches/patch_list.py | 1 + 2 files changed, 12 insertions(+) create mode 100644 patches/april_2013/p04_update_role_in_pages.py diff --git a/patches/april_2013/p04_update_role_in_pages.py b/patches/april_2013/p04_update_role_in_pages.py new file mode 100644 index 0000000000..6a4ecc6548 --- /dev/null +++ b/patches/april_2013/p04_update_role_in_pages.py @@ -0,0 +1,11 @@ +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() \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 181d6352ed..b29c2485db 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -236,4 +236,5 @@ patch_list = [ 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02', 'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02', "execute:webnotes.delete_doc('Search Criteria', 'time_log_summary')", + "patches.april_2013.p04_update_role_in_pages", ] \ No newline at end of file