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()`
This commit is contained in:
Raffael Meyer
2024-11-21 00:36:20 +01:00
committed by GitHub
parent 8d8070e8eb
commit 4b53075f84

View File

@@ -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,