fix: description set in the bom not pulled in the material request
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 766f675..6f63dcf 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -592,7 +592,6 @@
bom_item.idx,
item.item_name,
sum(bom_item.{qty_field}/ifnull(bom.quantity, 1)) * %(qty)s as qty,
- item.description,
item.image,
bom.project,
item.stock_uom,
@@ -621,17 +620,22 @@
where_conditions="",
is_stock_item=is_stock_item,
qty_field="stock_qty",
- select_columns = """, bom_item.source_warehouse, bom_item.operation, bom_item.include_item_in_manufacturing,
+ select_columns = """, bom_item.source_warehouse, bom_item.operation,
+ bom_item.include_item_in_manufacturing, bom_item.description,
(Select idx from `tabBOM Item` where item_code = bom_item.item_code and parent = %(parent)s limit 1) as idx""")
items = frappe.db.sql(query, { "parent": bom, "qty": qty, "bom": bom, "company": company }, as_dict=True)
elif fetch_scrap_items:
- query = query.format(table="BOM Scrap Item", where_conditions="", select_columns=", bom_item.idx", is_stock_item=is_stock_item, qty_field="stock_qty")
+ query = query.format(table="BOM Scrap Item", where_conditions="",
+ select_columns=", bom_item.idx, item.description", is_stock_item=is_stock_item, qty_field="stock_qty")
+
items = frappe.db.sql(query, { "qty": qty, "bom": bom, "company": company }, as_dict=True)
else:
query = query.format(table="BOM Item", where_conditions="", is_stock_item=is_stock_item,
qty_field="stock_qty" if fetch_qty_in_stock_uom else "qty",
- select_columns = ", bom_item.uom, bom_item.conversion_factor, bom_item.source_warehouse, bom_item.idx, bom_item.operation, bom_item.include_item_in_manufacturing")
+ select_columns = """, bom_item.uom, bom_item.conversion_factor, bom_item.source_warehouse,
+ bom_item.idx, bom_item.operation, bom_item.include_item_in_manufacturing,
+ bom_item.description """)
items = frappe.db.sql(query, { "qty": qty, "bom": bom, "company": company }, as_dict=True)
for item in items: