From 27b4ea5031b042dab856304a045f3a4b012d7a57 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Apr 2014 11:17:00 +0200 Subject: [PATCH] [web_export_view]: fixes export boolean fields --- web_export_view/i18n/web_export_view.pot | 14 ++++++++++++++ web_export_view/static/js/web_advanced_export.js | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/web_export_view/i18n/web_export_view.pot b/web_export_view/i18n/web_export_view.pot index 9adca17c..ea6d7b6f 100644 --- a/web_export_view/i18n/web_export_view.pot +++ b/web_export_view/i18n/web_export_view.pot @@ -27,3 +27,17 @@ msgstr "" #, python-format msgid "Excel" 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 "" diff --git a/web_export_view/static/js/web_advanced_export.js b/web_export_view/static/js/web_advanced_export.js index e869a707..36ba128a 100644 --- a/web_export_view/static/js/web_advanced_export.js +++ b/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")){ export_row.push(instance.web.parse_value(text, {'type': "float"})); } + else if (cell.classList.contains("oe_list_field_boolean")){ + var data_id = $( '
' + cell.innerHTML + '
'); + 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")){ export_row.push(parseInt(text)); }