From 5e1cfa4f5248e7c047c13680a65ba43cdfd197ac Mon Sep 17 00:00:00 2001 From: Pandiyan P Date: Fri, 18 Sep 2026 14:36:49 +0530 Subject: [PATCH] fix(stock): forward company to outward batch lookup (#59160) (cherry picked from commit 622b7e0caa1a299138767dd445fd6602659e6143) --- .../serial_and_batch_bundle/test_serial_and_batch_bundle.py | 2 ++ erpnext/stock/serial_batch_bundle.py | 1 + 2 files changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py index dd193a9d0cf..f35c91e5aad 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py @@ -259,6 +259,7 @@ class TestSerialandBatchBundle(ERPNextTestSuite): "item_code": batch_item_code, "warehouse": "_Test Warehouse - _TC", "stock_queue": json.dumps(stock_queue), + "company": "_Test Company", } ) @@ -430,6 +431,7 @@ class TestSerialandBatchBundle(ERPNextTestSuite): "actual_qty": qty, "item_code": batch_item_code, "warehouse": "_Test Warehouse - _TC", + "company": "_Test Company", } ) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index e91c3954c0d..3371c775a5d 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -1322,6 +1322,7 @@ class SerialBatchCreation: { "item_code": self.item_code, "warehouse": self.warehouse, + "company": self.get("company"), "qty": abs(self.actual_qty) if self.actual_qty else 0, "based_on": frappe.get_single_value("Stock Settings", "pick_serial_and_batch_based_on"), }