From d01335ab91376dc3751a32568440340d688410df Mon Sep 17 00:00:00 2001 From: shariquerik Date: Mon, 23 Aug 2021 11:26:43 +0530 Subject: [PATCH] fix: Faulty Export All rows visibility condition --- frappe/public/js/frappe/list/list_view.js | 3 ++- frappe/public/js/frappe/views/reports/report_view.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 8a0e43c8f3..d4133049e6 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -867,8 +867,9 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { filters: this.get_filters_for_args() }).then(total_count => { this.total_count = total_count || current_count; + this.count_without_children = count_without_children !== current_count ? count_without_children : undefined; let str = __('{0} of {1}', [current_count, this.total_count]); - if (count_without_children !== current_count) { + if (this.count_without_children) { str = __('{0} of {1} ({2} rows with children)', [count_without_children, this.total_count, current_count]); } return str; diff --git a/frappe/public/js/frappe/views/reports/report_view.js b/frappe/public/js/frappe/views/reports/report_view.js index 2547dd6407..b46e6fb374 100644 --- a/frappe/public/js/frappe/views/reports/report_view.js +++ b/frappe/public/js/frappe/views/reports/report_view.js @@ -1401,7 +1401,7 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView { } ]; - if (this.total_count > args.page_length) { + if (this.total_count > this.count_without_children || args.page_length) { fields.push({ fieldtype: 'Check', fieldname: 'export_all_rows',