mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
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:
@@ -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]):
|
if not item_code or item_code[1] in out or not item_tax_templates.get(item_code[1]):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
out[item_code[1]] = {}
|
out[item_code[1]] = ItemDetails()
|
||||||
item = frappe.get_cached_doc("Item", item_code[0])
|
item = frappe.get_cached_doc("Item", item_code[0])
|
||||||
ctx: ItemDetailsCtx = {
|
ctx: ItemDetailsCtx = {
|
||||||
"company": company,
|
"company": company,
|
||||||
|
|||||||
Reference in New Issue
Block a user