Browse Source

[web_export_view]: fixes export boolean fields

pull/4/head
unknown 11 years ago
parent
commit
4aa7ff5204
  1. 14
      web_export_view/i18n/web_export_view.pot
  2. 9
      web_export_view/static/js/web_advanced_export.js

14
web_export_view/i18n/web_export_view.pot

@ -27,3 +27,17 @@ msgstr ""
#, python-format #, python-format
msgid "Excel" msgid "Excel"
msgstr "" msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:81
#, python-format
msgid "True"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:84
#, python-format
msgid "False"
msgstr ""

9
web_export_view/static/js/web_advanced_export.js

@ -75,6 +75,15 @@ openerp.web_export_view = function(instance, m) {
if (cell.classList.contains("oe_list_field_float")){ if (cell.classList.contains("oe_list_field_float")){
export_row.push(instance.web.parse_value(text, {'type': "float"})); export_row.push(instance.web.parse_value(text, {'type': "float"}));
} }
else if (cell.classList.contains("oe_list_field_boolean")){
var data_id = $( '<div>' + cell.innerHTML + '</div>');
if(data_id.find('input').get(0).checked){
export_row.push(_t("True"));
}
else {
export_row.push(_t("False"));
}
}
else if (cell.classList.contains("oe_list_field_integer")){ else if (cell.classList.contains("oe_list_field_integer")){
export_row.push(parseInt(text)); export_row.push(parseInt(text));
} }

Loading…
Cancel
Save