fix: auto commit if too many writes reached

(cherry picked from commit 99a0ba0b45)
This commit is contained in:
Kavin
2025-09-22 18:54:57 +05:30
committed by Mergify
parent 5bfb4d2390
commit 0310172338

View File

@@ -6,6 +6,7 @@ def execute():
"POS Invoice Merge Log", {"docstatus": 1}, ["name", "pos_closing_entry"]
)
frappe.db.auto_commit_on_many_writes = 1
for log in pos_invoice_merge_logs:
if log.pos_closing_entry and frappe.db.exists("POS Closing Entry", log.pos_closing_entry):
company = frappe.db.get_value("POS Closing Entry", log.pos_closing_entry, "company")