diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 6423e8f87ed..5a850f06b98 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -54,9 +54,10 @@ class ReceivablePayableReport: self.filters.range = "30, 60, 90, 120" self.ranges = [num.strip() for num in self.filters.range.split(",") if num.strip().isdigit()] self.range_numbers = [num for num in range(1, len(self.ranges) + 2)] - self.ple_fetch_method = frappe.db.get_single_value( - "Accounts Settings", "receivable_payable_fetch_method" - ) + self.ple_fetch_method = ( + frappe.db.get_single_value("Accounts Settings", "receivable_payable_fetch_method") + or "Buffered Cursor" + ) # Fail Safe def run(self, args): self.filters.update(args) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 90d04f52fae..56e1d54d081 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -409,3 +409,4 @@ erpnext.patches.v15_0.update_query_report erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item erpnext.patches.v15_0.update_payment_schedule_fields_in_invoices erpnext.patches.v15_0.rename_group_by_to_categorize_by +execute:frappe.db.set_single_value("Accounts Settings", "receivable_payable_fetch_method", "Buffered Cursor")