From a7387b45ec6be4e2f8831937febb9a2bf5b581d7 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 14 May 2018 14:05:52 +0530 Subject: [PATCH] [fix] Get items from BOM error in python 3 (#14012) --- erpnext/manufacturing/doctype/bom/bom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 007299a798..73c8ca0eb1 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -591,6 +591,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite @frappe.whitelist() def get_bom_items(bom, company, qty=1, fetch_exploded=1): items = get_bom_items_as_dict(bom, company, qty, fetch_exploded).values() + items = list(items) items.sort(key = functools.cmp_to_key(lambda a, b: a.item_code > b.item_code and 1 or -1)) return items