Browse Source

[web_export_view]: Adds support to export boolean fields values

pull/2/head
unknown 11 years ago
parent
commit
cd2a5a4304
  1. 14
      web_export_view/static/js/web_advanced_export.js

14
web_export_view/static/js/web_advanced_export.js

@ -96,7 +96,19 @@ openerp.web_export_view = function(openerp) {
export_row = []; export_row = [];
$.each(export_columns_keys,function(){ $.each(export_columns_keys,function(){
cell = $row.find('td[data-field="'+this+'"]').get(0); cell = $row.find('td[data-field="'+this+'"]').get(0);
text = cell.text || cell.textContent || cell.innerHTML || "";
var data_id = $( '<div>' + cell.innerHTML + '</div>');
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");
}
}
else{
text = cell.text || cell.textContent || cell.innerHTML || "";
}
export_row.push(text.trim()); export_row.push(text.trim());
}); });
export_rows.push(export_row); export_rows.push(export_row);

Loading…
Cancel
Save