Browse Source

[IMP] web_export_view: enables export of boolean values in tree view

pull/2/head
unknown 11 years ago
committed by Pedro M. Baeza
parent
commit
173a6516b1
  1. 80
      web_export_view/i18n/web_export_view.pot
  2. 26
      web_export_view/static/js/web_advanced_export.js

80
web_export_view/i18n/web_export_view.pot

@ -0,0 +1,80 @@
# Translations template for PROJECT.
# Copyright (C) 2014 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2014-02-21 18:59+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.6\n"
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:103
#, python-format
msgid "True"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:106
#, python-format
msgid "False"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:38
#, python-format
msgid "Customize"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:40
#, python-format
msgid "Translate"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:42
#, python-format
msgid "Technical translation"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:46
#, python-format
msgid "Other Options"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:49
#, python-format
msgid "Import"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:52
#, python-format
msgid "Export"
msgstr ""
#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_advanced_export.js:56
#, python-format
msgid "Export current view"
msgstr ""

26
web_export_view/static/js/web_advanced_export.js

@ -89,17 +89,33 @@ openerp.web_export_view = function(openerp) {
}); });
rows = view.$element.find('.ui-widget-content tr'); rows = view.$element.find('.ui-widget-content tr');
export_rows = []; export_rows = [];
$.each(rows,function(){
$.each(rows,function(){
$row = $(this); $row = $(this);
// find only rows with data
// find only rows with data
if($row.attr('data-id')){ if($row.attr('data-id')){
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 || "";
export_row.push(text.trim());
var data_id = $( '<div>' + cell.innerHTML + '</div>');
if(data_id.find('input').get(0) != undefined) {
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 || "";
}
export_row.push(text.trim());
}); });
export_rows.push(export_row);
export_rows.push(export_row);
} }
}); });
$.blockUI(); $.blockUI();

Loading…
Cancel
Save