[Erp5-report] r24600 - in /erp5/trunk/products/ERP5OOo: OOoUtils.py tests/testOOoImport.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Nov 14 18:35:50 CET 2008


Author: jerome
Date: Fri Nov 14 18:35:49 2008
New Revision: 24600

URL: http://svn.erp5.org?rev=24600&view=rev
Log:
I made a mistake in r24599, this part should not convert values to float.

Modified:
    erp5/trunk/products/ERP5OOo/OOoUtils.py
    erp5/trunk/products/ERP5OOo/tests/testOOoImport.py

Modified: erp5/trunk/products/ERP5OOo/OOoUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/OOoUtils.py?rev=24600&r1=24599&r2=24600&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoUtils.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/OOoUtils.py [utf8] Fri Nov 14 18:35:49 2008
@@ -452,8 +452,7 @@
             elif value_type == 'time':
               cell_data = cell.getAttributeNS(self.ns['office'], 'time-value')
             elif value_type in ('float', 'percentage', 'currency'):
-              cell_data = float(cell.getAttributeNS(
-                                  self.ns['office'], 'value'))
+              cell_data = cell.getAttributeNS(self.ns['office'], 'value')
             else:
               text_tags = cell.xpath('.//*[name() = "text:p"]')
               if len(text_tags):

Modified: erp5/trunk/products/ERP5OOo/tests/testOOoImport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testOOoImport.py?rev=24600&r1=24599&r2=24600&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testOOoImport.py [utf8] Fri Nov 14 18:35:49 2008
@@ -345,11 +345,11 @@
     mapping = parser.getSpreadsheetsMapping()
     self.assertEquals(['Feuille1'], mapping.keys())
     self.assertEquals(mapping['Feuille1'][0],
-                      [1234.5678])
+                      ['1234.5678'])
     self.assertEquals(mapping['Feuille1'][1],
-                      [1234.5678])
+                      ['1234.5678'])
     self.assertEquals(mapping['Feuille1'][2],
-                      [0.1])
+                      ['0.1'])
     self.assertEquals(mapping['Feuille1'][3],
                       ['2008-11-14'])
     self.assertEquals(mapping['Feuille1'][4],




More information about the Erp5-report mailing list