From 8e703ef26f04b16db08a2b821a2025f42adfbc49 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 21 Feb 2012 16:29:46 +0530 Subject: [PATCH] packing slip fix --- .../patches/jan_mar_2012/fix_packing_slip.py | 20 +++++++++++++++++++ erpnext/patches/patch_list.py | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/jan_mar_2012/fix_packing_slip.py diff --git a/erpnext/patches/jan_mar_2012/fix_packing_slip.py b/erpnext/patches/jan_mar_2012/fix_packing_slip.py new file mode 100644 index 0000000000..98eb825981 --- /dev/null +++ b/erpnext/patches/jan_mar_2012/fix_packing_slip.py @@ -0,0 +1,20 @@ +def execute(): + """ + * Change DN to PS mapper + + Set Ref doc should be submitted to 0 + + Set validation logic of DN PS Table mapper record to docstatus=0 + """ + import webnotes + webnotes.conn.sql("""\ + UPDATE `tabDocType Mapper` + SET ref_doc_submitted=0 + WHERE name='Delivery Note-Packing Slip'""") + + webnotes.conn.sql("""\ + UPDATE `tabTable Mapper Detail` + SET validation_logic='docstatus=0' + WHERE parent='Delivery Note-Packing Slip' + AND docstatus=0 + AND from_table='Delivery Note' + AND to_table='Packing Slip'""") + diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index ccaebaec9f..e83d2a6aa4 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -99,5 +99,10 @@ patch_list = [ 'patch_module': 'patches.jan_mar_2012', 'patch_file': 'reload_item', 'description': 'reload item' - } + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'fix_packing_slip', + 'description': 'Update Mapper Delivery Note-Packing Slip' + }, ]