From 4e850f31d52c4bb6c7b9c0f556fe2d1ad12a5018 Mon Sep 17 00:00:00 2001 From: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com> Date: Fri, 8 May 2026 17:50:00 +0530 Subject: [PATCH] fix(stock): priorities pick list parent warehouse (#54788) --- erpnext/stock/doctype/pick_list/pick_list.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 7bc237f9f9e..7f6a6421c69 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -524,9 +524,11 @@ class PickList(TransactionBase): picked_items_details = self.get_picked_items_details(items) self.item_location_map = frappe._dict() - from_warehouses = [self.parent_warehouse] if self.parent_warehouse else [] + from_warehouses = [] + if self.parent_warehouse: + from_warehouses = [self.parent_warehouse] - if self.work_order: + elif self.work_order: root_warehouse = frappe.db.get_value( "Warehouse", {"company": self.company, "parent_warehouse": ["IS", "NOT SET"], "is_group": 1} )