Merge pull request #14013 from shariquerik/export-all-rows-fix

fix: Faulty Export All rows visibility condition
This commit is contained in:
mergify[bot] 2021-08-27 07:41:37 +00:00 committed by GitHub
commit 0bb05c290d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -868,8 +868,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;

View file

@ -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',