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.
This commit is contained in:
Chao-Yee Hsu 許朝益 2016-01-29 10:38:33 +08:00
parent bad13369d4
commit c118fc9343

View File

@ -258,7 +258,8 @@ def get_material_requests_based_on_supplier(supplier):
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)),
and mr.status != 'Stopped'""" % ', '.join(['%s']*len(supplier_items)
order by mr_item.item_code ASC),
tuple(supplier_items))
else:
material_requests = []