perf: memory consumption for the Batch-Wise Balance History report
This commit is contained in:
@@ -117,11 +117,14 @@ def get_stock_ledger_entries(filters):
|
|||||||
if filters.get(field):
|
if filters.get(field):
|
||||||
query = query.where(sle[field] == filters.get(field))
|
query = query.where(sle[field] == filters.get(field))
|
||||||
|
|
||||||
return query.run(as_dict=True)
|
return query
|
||||||
|
|
||||||
|
|
||||||
def get_item_warehouse_batch_map(filters, float_precision):
|
def get_item_warehouse_batch_map(filters, float_precision):
|
||||||
|
with frappe.db.unbuffered_cursor():
|
||||||
sle = get_stock_ledger_entries(filters)
|
sle = get_stock_ledger_entries(filters)
|
||||||
|
sle = sle.run(as_dict=True, as_iterator=True)
|
||||||
|
|
||||||
iwb_map = {}
|
iwb_map = {}
|
||||||
|
|
||||||
from_date = getdate(filters["from_date"])
|
from_date = getdate(filters["from_date"])
|
||||||
|
|||||||
Reference in New Issue
Block a user