← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~onnis-roberto/web-addons/6.1 into lp:web-addons/6.1

 

Roberto Onnis has proposed merging lp:~onnis-roberto/web-addons/6.1 into lp:web-addons/6.1.

Requested reviews:
  Lorenzo Battistini - Agile BG (elbati)

For more details, see:
https://code.launchpad.net/~onnis-roberto/web-addons/6.1/+merge/207662

[web_export_view]: enables export of boolean values in tree view
-- 
https://code.launchpad.net/~onnis-roberto/web-addons/6.1/+merge/207662
Your team Web-Addons Core Editors is subscribed to branch lp:web-addons/6.1.
=== modified file 'web_export_view/static/js/web_advanced_export.js'
--- web_export_view/static/js/web_advanced_export.js	2013-05-24 11:28:51 +0000
+++ web_export_view/static/js/web_advanced_export.js	2014-02-21 14:49:15 +0000
@@ -89,17 +89,29 @@
             });
             rows = view.$element.find('.ui-widget-content tr');
             export_rows = [];
-            $.each(rows,function(){
+            $.each(rows,function(){         
                 $row = $(this);
-                // find only rows with data
-                if($row.attr('data-id')){
-                    export_row = [];
+                // find only rows with data     
+                if($row.attr('data-id')){       
+                    export_row = [];                
                     $.each(export_columns_keys,function(){
                         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' &&
+                                        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_rows.push(export_row);
+                    export_rows.push(export_row);   
                 }
             });
             $.blockUI();


Follow ups