Open tfcloete opened 8 months ago
Suggested Fix: def _get_operations(bom_no, qty=1): data = frappe.get_all( "BOM Operation", filters={"parent": bom_no}, fields=[ "operation", "description", "workstation", "idx", "workstation_type", "base_hour_rate as hour_rate", "time_in_mins", "parent as bom", "batch_size", "sequence_id", "fixed_time", ], order_by="idx", ) for d in data: if not d.fixed_time:
d.time_in_mins = flt(d.time_in_mins) flt(d.batch_size) flt(qty)
d.status = "Pending"
I apologise for the incorrect format of the commit message.
Information about bug
When creating a Work Order from a BOM, with qty > 1, that has a (non-fixed time) operation with batch size > 1, the resulting operations time in the Work Order is incorrect.
Example:
Current: BOMQty = 2; operations time = 4; batch size = 2 ===> WOQty = 2; operations time = 2
Expected: BOMQty = 2; operations time = 4; batch size = 2 ===> WOQty = 2; operations time = 4
Module
manufacturing
Version
v14.35.2
Installation method
docker
Relevant log output / Stack trace / Full Error Message.
No response