Browse Source

Merge pull request #16725 from deepeshgarg007/item_dashboard

fix: Item name display issue fix in item dashboard
develop
Suraj Shetty 6 years ago
committed by GitHub
parent
commit
463a3cf8cf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      erpnext/stock/dashboard/item_dashboard.py

9
erpnext/stock/dashboard/item_dashboard.py

@ -28,7 +28,7 @@ def get_data(item_code=None, warehouse=None, item_group=None,
# user does not have access on warehouse
return []
return frappe.db.get_all('Bin', fields=['item_code', 'warehouse', 'projected_qty',
items = frappe.db.get_all('Bin', fields=['item_code', 'warehouse', 'projected_qty',
'reserved_qty', 'reserved_qty_for_production', 'reserved_qty_for_sub_contract', 'actual_qty', 'valuation_rate'],
or_filters={
'projected_qty': ['!=', 0],
@ -41,3 +41,10 @@ def get_data(item_code=None, warehouse=None, item_group=None,
order_by=sort_by + ' ' + sort_order,
limit_start=start,
limit_page_length='21')
for item in items:
item.update({
'item_name': frappe.get_cached_value("Item", item.item_code, 'item_name')
})
return items

Loading…
Cancel
Save