From e5604dc9440f13c488d5e6fdd50f07fce7b2523e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 26 Mar 2015 17:40:34 +0530 Subject: [PATCH] production order operation order by idx --- .../doctype/production_order/production_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index 524d11e98d..ead4b4fff9 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -56,7 +56,7 @@ class ProductionOrder(Document): def validate_warehouse(self): from erpnext.stock.utils import validate_warehouse_company - + for w in [self.fg_warehouse, self.wip_warehouse]: validate_warehouse_company(w, self.company) @@ -176,7 +176,7 @@ class ProductionOrder(Document): operations = frappe.db.sql("""select operation, description, workstation, hour_rate, time_in_mins, operating_cost as "planned_operating_cost", "Pending" as status - from `tabBOM Operation` where parent = %s""", self.bom_no, as_dict=1) + from `tabBOM Operation` where parent = %s order by idx""", self.bom_no, as_dict=1) self.set('operations', operations)