From fd33b2b718c6bda2f92613984bb41868f109371d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 9 Jul 2013 11:42:38 +0530 Subject: [PATCH] [patch] copy customer_address to shipping_address in delivery note --- patches/july_2013/p02_copy_shipping_address.py | 5 +++++ patches/patch_list.py | 1 + 2 files changed, 6 insertions(+) create mode 100644 patches/july_2013/p02_copy_shipping_address.py diff --git a/patches/july_2013/p02_copy_shipping_address.py b/patches/july_2013/p02_copy_shipping_address.py new file mode 100644 index 0000000000..c73f93db2a --- /dev/null +++ b/patches/july_2013/p02_copy_shipping_address.py @@ -0,0 +1,5 @@ +def execute(): + import webnotes + webnotes.reload_doc("stock", "doctype", "delivery_note") + webnotes.conn.sql("""update `tabDelivery Note` set shipping_address_name = customer_address, + shipping_address = address_display""") \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index f3aaa156c7..eee00fe855 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -248,4 +248,5 @@ patch_list = [ "patches.july_2013.p01_remove_doctype_mappers", "execute:webnotes.delete_doc('Report', 'Delivered Items To Be Billed')", "execute:webnotes.delete_doc('Report', 'Received Items To Be Billed')", + "patches.july_2013.p02_copy_shipping_address", ] \ No newline at end of file