refactor: remove unreachable UOM conversion in production plan

The division by conversion_factor in _adjust_required_qty_for_uom sits
directly after frappe.throw inside the same block, so it can never run.
It has been dead since commit 2a8cd05b44 (#27278) re-indented it into
the throw branch; the actual purchase-UOM conversion happens in
_material_request_item_row via _mr_purchase_conversion_factor.
This commit is contained in:
Mihir Kandoi
2026-08-06 20:48:19 +05:30
parent 12359c36bc
commit 44260b469f

View File

@@ -533,7 +533,6 @@ def _adjust_required_qty_for_uom(row, required_qty):
row["purchase_uom"], row["stock_uom"], row.item_code
)
)
required_qty = required_qty / row["conversion_factor"]
if frappe.db.get_value("UOM", row["purchase_uom"], "must_be_whole_number"):
required_qty = ceil(required_qty)