mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-12 14:11:46 +00:00
fix: exclude transferred_qty from work order item to pick list item mapping
get_mapped_doc copies same-named fields by default. work order item's transferred_qty (cumulative across the whole work order) was leaking into the new pick list item's transferred_qty (meant to track how much of that pick list row has been converted into a stock entry, starting at 0). the leaked value then got subtracted again in get_pending_transfer_stock_qty(), so every pick list after the first under-transferred raw materials by whatever was already recorded on the work order, driving material_transferred_for_manufacturing towards zero across repeated partial pick-list/finish cycles. fixes #57236, related to #56596
This commit is contained in:
@@ -488,6 +488,7 @@ def _pick_list_mapping(postprocess):
|
||||
"Work Order": {"doctype": "Pick List", "validation": {"docstatus": ["=", 1]}},
|
||||
"Work Order Item": {
|
||||
"doctype": "Pick List Item",
|
||||
"field_no_map": ["transferred_qty"],
|
||||
"postprocess": postprocess,
|
||||
"condition": lambda doc: abs(doc.transferred_qty) < abs(doc.required_qty),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user