Minor fix in bom_stock_qty patch

This commit is contained in:
Nabin Hait 2017-08-01 11:10:09 +05:30
parent 4d185f3541
commit 9b2b42dfc1

View File

@ -10,4 +10,5 @@ def execute():
frappe.reload_doc('manufacturing', 'doctype', 'bom_scrap_item')
frappe.db.sql("update `tabBOM Item` set stock_qty = qty, uom = stock_uom, conversion_factor = 1")
frappe.db.sql("update `tabBOM Explosion Item` set stock_qty = qty")
frappe.db.sql("update `tabBOM Scrap Item` set stock_qty = qty")
if "qty" in frappe.db.get_table_columns("BOM Scrap Item"):
frappe.db.sql("update `tabBOM Scrap Item` set stock_qty = qty")