mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-23 13:12:22 +01:00
fix(asset depreciation schedules): enable auto commit
(cherry picked from commit a4b24f7451)
This commit is contained in:
@@ -82,6 +82,9 @@ def get_asset_depreciation_schedules_map():
|
|||||||
.orderby(ds.idx)
|
.orderby(ds.idx)
|
||||||
).run(as_dict=True)
|
).run(as_dict=True)
|
||||||
|
|
||||||
|
if len(records) > 20000:
|
||||||
|
frappe.db.auto_commit_on_many_writes = True
|
||||||
|
|
||||||
asset_depreciation_schedules_map = frappe._dict()
|
asset_depreciation_schedules_map = frappe._dict()
|
||||||
for d in records:
|
for d in records:
|
||||||
asset_depreciation_schedules_map.setdefault((d.asset_name, cstr(d.finance_book)), []).append(d)
|
asset_depreciation_schedules_map.setdefault((d.asset_name, cstr(d.finance_book)), []).append(d)
|
||||||
|
|||||||
Reference in New Issue
Block a user