From 4b53075f84490946d451b8e824dc4306d1774ed0 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Thu, 21 Nov 2024 00:36:20 +0100 Subject: [PATCH] refactor: use `frappe._dict()` instead of `{}` (#44255) * refactor: use `frappe._dict()` instead of `{}` A downstream function (`_get_item_tax_template`) expects this to be a frappe._dict and fails otherwise. * refactor: use `ItemDetails()` --- 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 9c81b1c5b15..64cd9569481 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -550,7 +550,7 @@ def get_item_tax_info(company, tax_category, item_codes, item_rates=None, item_t if not item_code or item_code[1] in out or not item_tax_templates.get(item_code[1]): continue - out[item_code[1]] = {} + out[item_code[1]] = ItemDetails() item = frappe.get_cached_doc("Item", item_code[0]) ctx: ItemDetailsCtx = { "company": company,