From 9f94275d65c54e6d0663cc74295fefde1688f5bc Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 23 Feb 2012 11:27:40 +0530 Subject: [PATCH] allow deletion of products --- erpnext/patches/jan_mar_2012/website/all.py | 2 ++ .../patches/jan_mar_2012/website/allow_product_delete.py | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 erpnext/patches/jan_mar_2012/website/allow_product_delete.py diff --git a/erpnext/patches/jan_mar_2012/website/all.py b/erpnext/patches/jan_mar_2012/website/all.py index c68e65369c..1443f361fb 100644 --- a/erpnext/patches/jan_mar_2012/website/all.py +++ b/erpnext/patches/jan_mar_2012/website/all.py @@ -5,6 +5,7 @@ import patches.jan_mar_2012.website.cleanups import patches.jan_mar_2012.website.domain_list import patches.jan_mar_2012.website.file_data_rename import patches.jan_mar_2012.website.analytics +import patches.jan_mar_2012.website.allow_product_delete def execute(): @@ -15,3 +16,4 @@ def execute(): patches.jan_mar_2012.website.domain_list.execute() patches.jan_mar_2012.website.file_data_rename.execute() patches.jan_mar_2012.website.analytics.execute() + patches.jan_mar_2012.website.allow_product_delete.execute() diff --git a/erpnext/patches/jan_mar_2012/website/allow_product_delete.py b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py new file mode 100644 index 0000000000..54c0447a19 --- /dev/null +++ b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py @@ -0,0 +1,7 @@ +def execute(): + """ + Allow deletion of products + """ + import webnotes + webnotes.conn.sql("""UPDATE `tabDocPerm` SET cancel=1 + WHERE parent='Product' AND role='Website Manager'""")