Browse Source

fix: remove bad hardcoded max value

develop
Ankush Menat 3 years ago
committed by Ankush Menat
parent
commit
5f9bd9b8e9
  1. 4
      erpnext/manufacturing/doctype/work_order/work_order.py

4
erpnext/manufacturing/doctype/work_order/work_order.py

@ -685,9 +685,7 @@ class WorkOrder(Document):
if not d.operation:
d.operation = operation
else:
# Attribute a big number (999) to idx for sorting putpose in case idx is NULL
# For instance in BOM Explosion Item child table, the items coming from sub assembly items
for item in sorted(item_dict.values(), key=lambda d: d['idx'] or 9999):
for item in sorted(item_dict.values(), key=lambda d: d['idx'] or float('inf')):
self.append('required_items', {
'rate': item.rate,
'amount': item.rate * item.qty,

Loading…
Cancel
Save