From b625525b038805a3a41a16113dd00a065d2f4708 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Tue, 7 Jul 2026 16:57:28 +0530 Subject: [PATCH] fix(manufacturing): accept plain dict for doc in get_items_for_material_requests the whitelisted endpoint typed doc as str | frappe._dict | Document, so a json request body (a plain dict) failed pydantic type validation. widen to str | dict | Document, matching the convention used elsewhere in erpnext. --- .../doctype/production_plan/services/material_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/services/material_request.py b/erpnext/manufacturing/doctype/production_plan/services/material_request.py index c4f12d8f1b7..21b21aabff1 100644 --- a/erpnext/manufacturing/doctype/production_plan/services/material_request.py +++ b/erpnext/manufacturing/doctype/production_plan/services/material_request.py @@ -132,7 +132,7 @@ class MaterialRequestService: @frappe.whitelist() def get_items_for_material_requests( - doc: str | frappe._dict | Document, + doc: str | dict | Document, warehouses: str | list | None = None, get_parent_warehouse_data: bool | int | None = None, ):