From 7ee82813fd81ceddbde3a5dde8836178a92feaff Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Sun, 28 Sep 2025 22:46:14 +0530 Subject: [PATCH] fix: use sales_order from data instead of doc (cherry picked from commit 9f9120451b631f813252843cef304cd054588d9b) --- .../manufacturing/doctype/production_plan/production_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 68360b696c0..fb8c8039d98 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -1631,7 +1631,7 @@ def get_items_for_material_requests(doc, warehouses=None, get_parent_warehouse_d } ) - sales_order = doc.get("sales_order") + sales_order = data.get("sales_order") for item_code, details in item_details.items(): so_item_details.setdefault(sales_order, frappe._dict())