fix(Reports): don't export hidden columns in reports
This commit is contained in:
parent
bd16804a95
commit
e2eea4447b
2 changed files with 6 additions and 1 deletions
|
|
@ -299,6 +299,7 @@ def export_query():
|
|||
_("You can try changing the filters of your report."))
|
||||
return
|
||||
|
||||
data.columns = [col for col in data.columns if not col.get('hidden')]
|
||||
columns = get_columns_dict(data.columns)
|
||||
|
||||
from frappe.utils.xlsxutils import make_xlsx
|
||||
|
|
|
|||
|
|
@ -1084,7 +1084,11 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
], ({ file_format, include_indentation }) => {
|
||||
this.make_access_log('Export', file_format);
|
||||
if (file_format === 'CSV') {
|
||||
const column_row = this.columns.map(col => col.label);
|
||||
const column_row = this.columns.map(col => {
|
||||
if (!col.hidden) {
|
||||
return col.label;
|
||||
}
|
||||
});
|
||||
const data = this.get_data_for_csv(include_indentation);
|
||||
const out = [column_row].concat(data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue