fix: possible model sync issue

(cherry picked from commit 0069581aa3)
This commit is contained in:
ruthra kumar
2025-02-10 17:15:28 +05:30
committed by Mergify
parent b9b2fc5773
commit ea01fa135e

View File

@@ -11,16 +11,17 @@ def execute():
frappe.db.set_single_value("Accounts Settings", "reconciliation_queue_size", 5)
# Create Scheduler Event record if it doesn't exist
method = "erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation.trigger_reconciliation_for_queued_docs"
if not frappe.db.get_all(
"Scheduler Event", {"scheduled_against": "Process Payment Reconciliation", "method": method}
):
frappe.get_doc(
{
"doctype": "Scheduler Event",
"scheduled_against": "Process Payment Reconciliation",
"method": method,
}
).save()
if frappe.reload_doc("core", "doctype", "scheduler_event"):
method = "erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation.trigger_reconciliation_for_queued_docs"
if not frappe.db.get_all(
"Scheduler Event", {"scheduled_against": "Process Payment Reconciliation", "method": method}
):
frappe.get_doc(
{
"doctype": "Scheduler Event",
"scheduled_against": "Process Payment Reconciliation",
"method": method,
}
).save()
sync_auto_reconcile_config(15)
sync_auto_reconcile_config(15)