mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
[fix] Get items from BOM error in python 3 (#14012)
This commit is contained in:
@@ -591,6 +591,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_bom_items(bom, company, qty=1, fetch_exploded=1):
|
def get_bom_items(bom, company, qty=1, fetch_exploded=1):
|
||||||
items = get_bom_items_as_dict(bom, company, qty, fetch_exploded).values()
|
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))
|
items.sort(key = functools.cmp_to_key(lambda a, b: a.item_code > b.item_code and 1 or -1))
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user