refactor(sales_person_wise_transaction_summary): Replace SQL with ORM (#55190)

This commit is contained in:
Loic Oberle
2026-05-23 07:58:42 +02:00
committed by GitHub
parent c9593d8c62
commit de531ceeb9

View File

@@ -250,8 +250,5 @@ def get_items(filters):
def get_item_details():
item_details = {}
for d in frappe.db.sql("""SELECT `name`, `item_group`, `brand` FROM `tabItem`""", as_dict=1):
item_details.setdefault(d.name, d)
return item_details
items = frappe.get_all("Item", fields=["name", "item_group", "brand"])
return {d.name: d for d in items}