Merge pull request #22109 from rohitwaghchaure/routing-operations-not-in-a-sequence
fix: routing operations not added sequentially in the BOM
This commit is contained in:
commit
2213ea3d82
@ -112,13 +112,14 @@ class BOM(WebsiteGenerator):
|
|||||||
if self.routing:
|
if self.routing:
|
||||||
self.set("operations", [])
|
self.set("operations", [])
|
||||||
for d in frappe.get_all("BOM Operation", fields = ["*"],
|
for d in frappe.get_all("BOM Operation", fields = ["*"],
|
||||||
filters = {'parenttype': 'Routing', 'parent': self.routing}):
|
filters = {'parenttype': 'Routing', 'parent': self.routing}, order_by="idx"):
|
||||||
child = self.append('operations', {
|
child = self.append('operations', {
|
||||||
"operation": d.operation,
|
"operation": d.operation,
|
||||||
"workstation": d.workstation,
|
"workstation": d.workstation,
|
||||||
"description": d.description,
|
"description": d.description,
|
||||||
"time_in_mins": d.time_in_mins,
|
"time_in_mins": d.time_in_mins,
|
||||||
"batch_size": d.batch_size
|
"batch_size": d.batch_size,
|
||||||
|
"idx": d.idx
|
||||||
})
|
})
|
||||||
child.hour_rate = flt(d.hour_rate / self.conversion_rate, 2)
|
child.hour_rate = flt(d.hour_rate / self.conversion_rate, 2)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user