mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-19 01:18:43 +00:00
work order status was decided using a stale transferred-qty value,
computed before the current stock entry's transfer got recomputed.
this left work orders stuck at "not started" for pick-list-driven
transfers, since those entries never set fg_completed_qty and their
transferred qty can only be known from actual item-level transfers.
an earlier attempt fixed this by setting fg_completed_qty from the pick
list's for_qty, but that broke two things tied to fg_completed_qty
being zero: the excess-transfer guard, and the partial-transfer
fraction logic used to avoid marking a work order as fully supplied too
early.
recompute the transferred qty first, then decide status from the fresh
value. revert the fg_completed_qty change since it's no longer needed.
(cherry picked from commit d072909451)
# Conflicts:
# erpnext/manufacturing/doctype/work_order/services/required_items.py
# erpnext/manufacturing/doctype/work_order/services/status.py
# erpnext/manufacturing/doctype/work_order/work_order.py