From 3979ec99db1596c981e2f74539bc33dcb4ec2bbe Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Feb 2014 17:24:05 +0100 Subject: [PATCH] [web_export_view]: fixes unandled case in if else construct --- .../static/js/web_advanced_export.js | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/web_export_view/static/js/web_advanced_export.js b/web_export_view/static/js/web_advanced_export.js index cd6758c7..847ad2c6 100644 --- a/web_export_view/static/js/web_advanced_export.js +++ b/web_export_view/static/js/web_advanced_export.js @@ -92,20 +92,24 @@ openerp.web_export_view = function(openerp) { $.each(rows,function(){ $row = $(this); // find only rows with data - if($row.attr('data-id')){ - export_row = []; + if($row.attr('data-id')){ + export_row = []; $.each(export_columns_keys,function(){ cell = $row.find('td[data-field="'+this+'"]').get(0); var data_id = $( '
' + cell.innerHTML + '
'); if(data_id.find('input').get(0) != undefined) { - if(data_id.find('input').get(0).type == 'checkbox' && - data_id.find('input').get(0).checked){ - text = _t("True"); - } - else { - text = _t("False"); - } - } + if(data_id.find('input').get(0).type == 'checkbox'){ + if(data_id.find('input').get(0).checked){ + text = _t("True"); + } + else { + text = _t("False"); + } + } + else { + text = cell.text || cell.textContent || cell.innerHTML || ""; + } + } else{ text = cell.text || cell.textContent || cell.innerHTML || ""; }