From 7dac750ffed7c7b762cc88680ec0e3a3344a3c00 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 20 Jan 2015 18:02:54 +0530 Subject: [PATCH] patch fix --- erpnext/patches/v5_0/update_item_name_in_bom.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/patches/v5_0/update_item_name_in_bom.py b/erpnext/patches/v5_0/update_item_name_in_bom.py index 20c346ec23..1e858c5b22 100644 --- a/erpnext/patches/v5_0/update_item_name_in_bom.py +++ b/erpnext/patches/v5_0/update_item_name_in_bom.py @@ -4,9 +4,9 @@ import frappe def execute(): - frappe.db.sql("""update `tabBOM` set `tabBOM`.item_name = ( select `tabItem`.item_name \ - from `tabItem` where `tabItem`.name = `tabBOM`.item)""") - frappe.db.sql("""update `tabBOM Item` set item_name = ( select item_name \ - from tabItem where `tabItem`.name = `tabBOM Item`.item_code)""") - frappe.db.sql("""update `tabBOM Explosion Item` set `tabBOM Explosion Item`.item_name = \ - ( select `tabItem`.item_name from `tabItem` where `tabItem`.name = `tabBOM Explosion Item`.item_code)""") \ No newline at end of file + frappe.db.sql("""update `tabBOM` as bom set bom.item_name = \ + ( select item.item_name from `tabItem` as item where item.name = bom.item)""") + frappe.db.sql("""update `tabBOM Item` as bomItem set bomItem.item_name = ( select item.item_name \ + from `tabItem` as item where item.name = bomItem.item_code)""") + frappe.db.sql("""update `tabBOM Explosion Item` as explosionItem set explosionItem.item_name = \ + ( select item.item_name from `tabItem` as item where item.name = explosionItem.item_code)""") \ No newline at end of file