From ebb4a3d053f2c08b23552410dd8bffde45d19da7 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 16 Mar 2026 10:16:21 +0530 Subject: [PATCH] fix: use bom source warehouse in WO created from PP --- .../manufacturing/doctype/production_plan/production_plan.py | 2 ++ .../production_plan_sub_assembly_item.json | 2 +- erpnext/manufacturing/doctype/work_order/work_order.json | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 5ed4c903f4e..9da41253c5b 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -730,6 +730,7 @@ class ProductionPlan(Document): "description": d.description, "stock_uom": d.stock_uom, "company": self.company, + "source_warehouse": frappe.get_value("BOM", d.bom_no, "default_source_warehouse"), "fg_warehouse": d.warehouse, "production_plan": self.name, "production_plan_item": d.name, @@ -806,6 +807,7 @@ class ProductionPlan(Document): continue work_order_data = { + "source_warehouse": frappe.get_value("BOM", row.bom_no, "default_source_warehouse"), "wip_warehouse": default_warehouses.get("wip_warehouse"), "fg_warehouse": default_warehouses.get("fg_warehouse"), "scrap_warehouse": default_warehouses.get("scrap_warehouse"), diff --git a/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.json b/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.json index 26d65116396..35f7bc39799 100644 --- a/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.json +++ b/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.json @@ -268,7 +268,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2026-02-11 13:00:09.092676", + "modified": "2026-03-16 10:28:41.879801", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Plan Sub Assembly Item", diff --git a/erpnext/manufacturing/doctype/work_order/work_order.json b/erpnext/manufacturing/doctype/work_order/work_order.json index 4365a501ae3..6e5295fbfa0 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.json +++ b/erpnext/manufacturing/doctype/work_order/work_order.json @@ -570,7 +570,8 @@ { "fieldname": "production_plan_sub_assembly_item", "fieldtype": "Data", - "label": "Production Plan Sub-assembly Item", + "hidden": 1, + "label": "Production Plan Sub Assembly Item", "no_copy": 1, "print_hide": 1, "read_only": 1 @@ -704,7 +705,7 @@ "image_field": "image", "is_submittable": 1, "links": [], - "modified": "2026-02-06 17:53:11.295600", + "modified": "2026-03-16 10:15:28.708688", "modified_by": "Administrator", "module": "Manufacturing", "name": "Work Order",