From 3fd5aace0ab0c5dcfdc3a55c2da7fd5c80ebdb07 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 14 Oct 2025 20:08:22 +0530 Subject: [PATCH] fix: source warehouse validation in manufacturing entry during subcontracting inward --- erpnext/controllers/subcontracting_inward_controller.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/subcontracting_inward_controller.py b/erpnext/controllers/subcontracting_inward_controller.py index 73256afd852..b6954e26d91 100644 --- a/erpnext/controllers/subcontracting_inward_controller.py +++ b/erpnext/controllers/subcontracting_inward_controller.py @@ -118,9 +118,12 @@ class SubcontractingInwardController: ) def validate_manufacture(self): - warehouse = frappe.get_cached_value( - "Subcontracting Inward Order", self.subcontracting_inward_order, "customer_warehouse" + skip_transfer, customer_warehouse, wip_warehouse = frappe.get_cached_value( + "Work Order", + self.work_order, + ["skip_transfer", "source_warehouse", "wip_warehouse"], ) + warehouse = customer_warehouse if skip_transfer else wip_warehouse items = [ item