From c3467cc169878eb1a81911e9b9cfac43283df918 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 12:34:59 +0000 Subject: [PATCH] fix(stock): priorities pick list parent warehouse (backport #54788) (#54792) fix(stock): priorities pick list parent warehouse (#54788) (cherry picked from commit 4e850f31d52c4bb6c7b9c0f556fe2d1ad12a5018) Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com> --- 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 d717bbceeb3..41624477882 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -504,9 +504,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} )