2015-03-03 09:25:30 +00:00
|
|
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2015-01-20 12:09:46 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2019-01-22 12:52:20 +00:00
|
|
|
from __future__ import unicode_literals
|
2015-01-20 12:09:46 +00:00
|
|
|
import frappe
|
|
|
|
|
|
|
|
def execute():
|
2015-02-04 05:10:02 +00:00
|
|
|
frappe.reload_doc("manufacturing", "doctype", "bom")
|
|
|
|
frappe.reload_doc("manufacturing", "doctype", "bom_item")
|
|
|
|
frappe.reload_doc("manufacturing", "doctype", "bom_explosion_item")
|
2015-02-04 13:22:35 +00:00
|
|
|
frappe.reload_doc("manufacturing", "doctype", "bom_operation")
|
2015-02-04 05:10:02 +00:00
|
|
|
|
2015-01-20 12:32:54 +00:00
|
|
|
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 = \
|
2015-02-04 05:10:02 +00:00
|
|
|
( select item.item_name from `tabItem` as item where item.name = explosionItem.item_code)""")
|