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