From aec5553814d276110962d4f8e0b94a0a76c3ef4f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 4 Jun 2013 17:20:47 +0530 Subject: [PATCH] bom exploded items grouped by items --- patches/june_2013/p01_update_bom_exploded_items.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/patches/june_2013/p01_update_bom_exploded_items.py b/patches/june_2013/p01_update_bom_exploded_items.py index 657c2c036a..eff0931e4d 100644 --- a/patches/june_2013/p01_update_bom_exploded_items.py +++ b/patches/june_2013/p01_update_bom_exploded_items.py @@ -21,6 +21,9 @@ def execute(): updated_bom = [] for bom in webnotes.conn.sql("select name from tabBOM where docstatus < 2"): if bom[0] not in updated_bom: - bom_obj = webnotes.get_obj("BOM", bom[0], with_children=1) - updated_bom = bom_obj.update_cost_and_exploded_items(updated_bom) - webnotes.conn.commit() \ No newline at end of file + try: + bom_obj = webnotes.get_obj("BOM", bom[0], with_children=1) + updated_bom = bom_obj.update_cost_and_exploded_items(updated_bom) + webnotes.conn.commit() + except: + pass \ No newline at end of file