From a5ed9fdc67986988388346dc97e832ecf3739ae6 Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Thu, 2 Oct 2025 15:18:09 +0530 Subject: [PATCH] fix: add default scrap warehouse in wo (cherry picked from commit 7e51346946fe02cd3a1e4cb530859b353ce357bc) --- .../manufacturing/doctype/production_plan/production_plan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index fb8c8039d98..d44f48a08ed 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -748,6 +748,7 @@ class ProductionPlan(Document): work_order_data = { "wip_warehouse": default_warehouses.get("wip_warehouse"), "fg_warehouse": default_warehouses.get("fg_warehouse"), + "scrap_warehouse": default_warehouses.get("scrap_warehouse"), "company": self.get("company"), } @@ -1821,7 +1822,7 @@ def get_sub_assembly_items( def set_default_warehouses(row, default_warehouses): - for field in ["wip_warehouse", "fg_warehouse"]: + for field in ["wip_warehouse", "fg_warehouse", "scrap_warehouse"]: if not row.get(field): row[field] = default_warehouses.get(field)