Merge pull request #2503 from nabinhait/fix1

packing list index
diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py
index 9263907..4ce940c 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.py
+++ b/erpnext/stock/doctype/packed_item/packed_item.py
@@ -27,7 +27,7 @@
 		where item_code = %s and warehouse = %s""", (item, warehouse), as_dict = 1)
 	return det and det[0] or ''
 
-def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packing_list_idx):
+def update_packing_list_item(obj, packing_item_code, qty, warehouse, line):
 	bin = get_bin_qty(packing_item_code, warehouse)
 	item = get_packing_item_details(packing_item_code)
 
@@ -54,9 +54,7 @@
 		pi.warehouse = warehouse
 	if not pi.batch_no:
 		pi.batch_no = cstr(line.get("batch_no"))
-	pi.idx = packing_list_idx
 
-	packing_list_idx += 1
 
 
 def make_packing_list(obj, item_table_fieldname):
@@ -64,13 +62,11 @@
 
 	if obj.get("_action") and obj._action == "update_after_submit": return
 
-	packing_list_idx = 0
 	parent_items = []
 	for d in obj.get(item_table_fieldname):
 		if frappe.db.get_value("Sales BOM", {"new_item_code": d.item_code}):
 			for i in get_sales_bom_items(d.item_code):
-				update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty),
-					d.warehouse, d, packing_list_idx)
+				update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), d.warehouse, d)
 
 			if [d.item_code, d.name] not in parent_items:
 				parent_items.append([d.item_code, d.name])