From c4f90c3b34ca03fb5c7c78be9960c1867f439e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Di=C3=B3genes=20Souza?= <103958767+devdiogenes@users.noreply.github.com> Date: Wed, 17 Sep 2025 09:35:49 -0300 Subject: [PATCH] fix: 'NoneType' object has no attribute 'get' in get_item_details.py (#49381) --- erpnext/stock/get_item_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 7579baab64c..f755e40bc31 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -202,7 +202,7 @@ def update_stock(ctx, out, doc=None): "item_code": ctx.item_code, "warehouse": ctx.warehouse, "based_on": frappe.get_single_value("Stock Settings", "pick_serial_and_batch_based_on"), - "sabb_voucher_no": doc.get("name"), + "sabb_voucher_no": doc.get("name") if doc else None, "sabb_voucher_detail_no": ctx.child_docname, "sabb_voucher_type": ctx.doctype, }