From 326f88cce660bdd10da0b26685631536eb6d2e21 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 3 Aug 2012 19:19:23 +0530 Subject: [PATCH] fixed patch: repost stock due to wrong packing list --- .../repost_stock_due_to_wrong_packing_list.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/patches/july_2012/repost_stock_due_to_wrong_packing_list.py b/erpnext/patches/july_2012/repost_stock_due_to_wrong_packing_list.py index a8077c224d..3b21ca6102 100644 --- a/erpnext/patches/july_2012/repost_stock_due_to_wrong_packing_list.py +++ b/erpnext/patches/july_2012/repost_stock_due_to_wrong_packing_list.py @@ -3,8 +3,11 @@ import webnotes def execute(): # add index webnotes.conn.commit() - webnotes.conn.sql("""create index item_code_warehouse - on `tabDelivery Note Packing Item` (item_code, warehouse)""") + try: + webnotes.conn.sql("""create index item_code_warehouse + on `tabDelivery Note Packing Item` (item_code, warehouse)""") + except: + pass webnotes.conn.begin() repost_reserved_qty() @@ -72,9 +75,6 @@ def cleanup_wrong_sle(): def create_comment(dn): from webnotes.model.doc import Document cmt = Document('Comment') - for arg in ['comment', 'comment_by', 'comment_by_fullname', 'comment_doctype', \ - 'comment_docname']: - cmt.fields[arg] = args[arg] cmt.comment = 'Cancelled by administrator due to wrong entry in packing list' cmt.comment_by = 'Administrator' cmt.comment_by_fullname = 'Administrator'