[FIX] [web_export_view] Exporting records from a grouped view causes data rows have an empty cell at the beginning. (#807)

pull/923/head
Pedro Gómez 2018-05-08 12:07:23 +02:00 committed by Pedro M. Baeza
parent 3e30d1f16f
commit 6b9cb73cd4
1 changed files with 8 additions and 6 deletions

View File

@ -140,12 +140,14 @@ openerp.web_export_view = function (instance) {
var export_row = [], var export_row = [],
record = new instance.web.list.Record(record).toForm(); record = new instance.web.list.Record(record).toForm();
$.each(view.visible_columns, function() { $.each(view.visible_columns, function() {
export_row.push( if(this.tag == 'field'){
this.type != 'integer' && this.type != 'float' ? export_row.push(
jQuery('<div/>').html(this.format( this.type != 'integer' && this.type != 'float' ?
record.data, {process_modifiers: false} jQuery('<div/>').html(this.format(
)).text() : record.data[this.id].value record.data, {process_modifiers: false}
); )).text() : record.data[this.id].value
);
};
}) })
export_rows.push(export_row); export_rows.push(export_row);
}); });