Merge pull request #26038 from akhilnarang/fix-reportview-export-all-disabled-count

fix(report_view): allow exporting all rows even if count is disabled
This commit is contained in:
Akhil Narang 2024-04-18 16:20:29 +05:30 committed by GitHub
commit 5189fbb4b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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?", [`<b>${this.total_count}</b>`]),
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?", [`<b>${this.total_count}</b>`]),
},
];
}