From 6a589be1c5d57467a4b83b49232922192083e09b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 22 Oct 2013 10:54:59 +0530 Subject: [PATCH] [patch] remove sales and purchase return tool --- .../march_2013/p06_remove_sales_purchase_return_tool.py | 6 ++++-- .../p03_remove_sales_and_purchase_return_tool.py | 8 ++++++++ patches/patch_list.py | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 patches/october_2013/p03_remove_sales_and_purchase_return_tool.py diff --git a/patches/march_2013/p06_remove_sales_purchase_return_tool.py b/patches/march_2013/p06_remove_sales_purchase_return_tool.py index ed8fbc87fd5..ac11eccc0ac 100644 --- a/patches/march_2013/p06_remove_sales_purchase_return_tool.py +++ b/patches/march_2013/p06_remove_sales_purchase_return_tool.py @@ -4,5 +4,7 @@ import webnotes def execute(): - webnotes.delete_doc("DocType", "Sales and Purchase Return Item") - webnotes.delete_doc("DocType", "Sales and Purchase Return Tool") \ No newline at end of file + if webnotes.conn.exists("DocType", "Sales and Purchase Return Item"): + webnotes.delete_doc("DocType", "Sales and Purchase Return Item") + if webnotes.conn.exists("DocType", "Sales and Purchase Return Tool"): + webnotes.delete_doc("DocType", "Sales and Purchase Return Tool") \ No newline at end of file diff --git a/patches/october_2013/p03_remove_sales_and_purchase_return_tool.py b/patches/october_2013/p03_remove_sales_and_purchase_return_tool.py new file mode 100644 index 00000000000..e0965ab0a00 --- /dev/null +++ b/patches/october_2013/p03_remove_sales_and_purchase_return_tool.py @@ -0,0 +1,8 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals + +def execute(): + from patches.march_2013 import p06_remove_sales_purchase_return_tool + p06_remove_sales_purchase_return_tool.execute() \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 0b27a2e0d8b..e353ab628af 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -224,4 +224,5 @@ patch_list = [ "patches.october_2013.repost_planned_qty", "patches.october_2013.p02_update_price_list_and_item_details_in_item_price", "execute:webnotes.delete_doc('Report', 'Item-wise Price List')", + "patches.october_2013.p03_remove_sales_and_purchase_return_tool", ] \ No newline at end of file