From 4549c69ce38215fd70d76950f3ec8af103761aed Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Thu, 18 Apr 2024 15:45:24 +0530 Subject: [PATCH] fix(report_view): allow exporting all rows even if count is disabled Signed-off-by: Akhil Narang --- .../public/js/frappe/views/reports/report_view.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/views/reports/report_view.js b/frappe/public/js/frappe/views/reports/report_view.js index 9cb10aba87..5aedbb70da 100644 --- a/frappe/public/js/frappe/views/reports/report_view.js +++ b/frappe/public/js/frappe/views/reports/report_view.js @@ -1553,12 +1553,22 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView { const selected_items = this.get_checked_items(true); let extra_fields = null; - if (this.total_count > (this.count_without_children || args.page_length)) { + if (this.list_view_settings.disable_count) { extra_fields = [ { fieldtype: "Check", fieldname: "export_all_rows", - label: __("Export All {0} rows?", [`${this.total_count}`]), + label: __("Export all matching rows?"), + }, + ]; + } else if ( + this.total_count > (this.count_without_children || args.page_length) + ) { + extra_fields = [ + { + fieldtype: "Check", + fieldname: "export_all_rows", + label: __("Export all {0} rows?", [`${this.total_count}`]), }, ]; }