Update material_request.py
Add "order by mr_item.item_code ASC" to 'get_material_requests_based_on_supplier(supplier)' in order to get material request item sorted by ascending order.
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index 034745f..6f6f78e 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -258,8 +258,8 @@
and mr.material_request_type = 'Purchase'
and mr.per_ordered < 99.99
and mr.docstatus = 1
- and mr.status != 'Stopped'""" % ', '.join(['%s']*len(supplier_items)
- order by mr_item.item_code ASC),
+ and mr.status != 'Stopped'
+ order by mr_item.item_code ASC""" % ', '.join(['%s']*len(supplier_items)),
tuple(supplier_items))
else:
material_requests = []