diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py index e36a4be75c2c..05c0c73b7cca 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py @@ -244,7 +244,7 @@ def populate_items_table(self): bom = ( frappe.db.get_value( "Subcontracting BOM", - {"finished_good": item.item_code, "is_active": 1}, + {"finished_good": item.name, "is_active": 1}, "finished_good_bom", ) or item.default_bom @@ -252,7 +252,7 @@ def populate_items_table(self): items.append( { - "item_code": item.item_code, + "item_code": item.name, "item_name": item.item_name, "schedule_date": self.schedule_date, "description": item.description,