mirror of https://github.com/OCA/web.git
[11.0][FIX] web_export_view: Issue #1099
parent
dce6b9cca5
commit
81832b05e5
|
@ -49,15 +49,18 @@ odoo.define('web_export_view', function (require) {
|
||||||
var export_columns_keys = [];
|
var export_columns_keys = [];
|
||||||
var export_columns_names = [];
|
var export_columns_names = [];
|
||||||
var column_index = 0;
|
var column_index = 0;
|
||||||
var column_header_selector;
|
var column_header_selector = '';
|
||||||
|
var isGrouped = view.renderer.state.groupedBy.length > 0;
|
||||||
$.each(view.renderer.columns, function () {
|
$.each(view.renderer.columns, function () {
|
||||||
if (this.tag == 'field' && (this.attrs.widget === undefined || this.attrs.widget != 'handle')) {
|
if (this.tag == 'field' && (this.attrs.widget === undefined || this.attrs.widget != 'handle')) {
|
||||||
// non-fields like `_group` or buttons
|
// non-fields like `_group` or buttons
|
||||||
export_columns_keys.push(column_index);
|
export_columns_keys.push(column_index);
|
||||||
column_header_selector = '.o_list_view > thead > tr> th:not([class*="o_list_record_selector"]):eq('+column_index+')';
|
var css_selector_index = isGrouped
|
||||||
|
? column_index+1 : column_index;
|
||||||
|
column_header_selector = '.o_list_view > thead > tr> th:not([class*="o_list_record_selector"]):eq('+css_selector_index+')';
|
||||||
export_columns_names.push(view.$el.find(column_header_selector)[0].textContent);
|
export_columns_names.push(view.$el.find(column_header_selector)[0].textContent);
|
||||||
}
|
}
|
||||||
column_index ++;
|
++column_index;
|
||||||
});
|
});
|
||||||
var export_rows = [];
|
var export_rows = [];
|
||||||
$.blockUI();
|
$.blockUI();
|
||||||
|
|
Loading…
Reference in New Issue