From 0cbf049608f8d2e3b86947e433bd33eee6343752 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 09:37:03 +0530 Subject: [PATCH] chore(BOM Explorer): display items in the same order as in the BOM (backport #41496) (#41510) chore(BOM Explorer): display items in the same order as in the BOM (#41496) (cherry picked from commit bd381cc0c607b2fc44ebbd854689686d37d67c7a) Co-authored-by: Samuel Danieli <23150094+scdanieli@users.noreply.github.com> --- erpnext/manufacturing/report/bom_explorer/bom_explorer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/report/bom_explorer/bom_explorer.py b/erpnext/manufacturing/report/bom_explorer/bom_explorer.py index 2aa31be0f0e..97c85502c98 100644 --- a/erpnext/manufacturing/report/bom_explorer/bom_explorer.py +++ b/erpnext/manufacturing/report/bom_explorer/bom_explorer.py @@ -21,7 +21,8 @@ def get_exploded_items(bom, data, indent=0, qty=1): exploded_items = frappe.get_all( "BOM Item", filters={"parent": bom}, - fields=["qty", "bom_no", "qty", "item_code", "item_name", "description", "uom"], + fields=["qty", "bom_no", "qty", "item_code", "item_name", "description", "uom", "idx"], + order_by="idx ASC", ) for item in exploded_items: