refactor: set default for fetch methods

This commit is contained in:
ruthra kumar
2025-05-05 13:58:08 +05:30
parent b5bb6f3508
commit ca1e81e1b5
2 changed files with 5 additions and 3 deletions

View File

@@ -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)

View File

@@ -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")