From 3b9f8aa378bae42164079f52e3e2bc025edb6938 Mon Sep 17 00:00:00 2001 From: vishnu Date: Sun, 18 Aug 2024 09:56:12 +0000 Subject: [PATCH] fix: warehouse not mapping correctly during Delivery Note creation. --- erpnext/selling/doctype/sales_order/sales_order.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 8d0329641c7a..b68c3ce5da4b 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1043,6 +1043,7 @@ def update_dn_item(source, target, source_parent): ) dn_item.qty = flt(sre.reserved_qty) * flt(dn_item.get("conversion_factor", 1)) + dn_item.warehouse = sre.warehouse if sre.reservation_based_on == "Serial and Batch" and (sre.has_serial_no or sre.has_batch_no): dn_item.serial_and_batch_bundle = get_ssb_bundle_for_voucher(sre)