fix: set bin details when adding item using update items (backport #55096) (#55098)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
fix: set bin details when adding item using update items (#55096)
This commit is contained in:
mergify[bot]
2026-05-20 16:21:10 +05:30
committed by GitHub
parent 17bc2b691f
commit bb87ffc90a

View File

@@ -72,6 +72,7 @@ from erpnext.stock.get_item_details import (
ItemDetailsCtx,
_get_item_tax_template,
_get_item_tax_template_from_item_group,
get_bin_details,
get_conversion_factor,
get_item_details,
get_item_tax_map,
@@ -3737,6 +3738,7 @@ def set_order_defaults(parent_doctype, parent_doctype_name, child_doctype, child
child_item.warehouse = get_item_warehouse_(p_doc, item, overwrite_warehouse=True)
conversion_factor = flt(get_conversion_factor(item.item_code, child_item.uom).get("conversion_factor"))
child_item.conversion_factor = flt(trans_item.get("conversion_factor")) or conversion_factor
child_item.update(get_bin_details(child_item.item_code, child_item.warehouse, p_doc.get("company")))
if child_doctype in ["Purchase Order Item", "Supplier Quotation Item"]:
# Initialized value will update in parent validation