Commit 3f10878c authored by Jérome Perrin's avatar Jérome Perrin

I made a mistake in r24599, this part should not convert values to float.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24600 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9aa32b13
...@@ -452,8 +452,7 @@ class OOoParser(Implicit): ...@@ -452,8 +452,7 @@ class OOoParser(Implicit):
elif value_type == 'time': elif value_type == 'time':
cell_data = cell.getAttributeNS(self.ns['office'], 'time-value') cell_data = cell.getAttributeNS(self.ns['office'], 'time-value')
elif value_type in ('float', 'percentage', 'currency'): elif value_type in ('float', 'percentage', 'currency'):
cell_data = float(cell.getAttributeNS( cell_data = cell.getAttributeNS(self.ns['office'], 'value')
self.ns['office'], 'value'))
else: else:
text_tags = cell.xpath('.//*[name() = "text:p"]') text_tags = cell.xpath('.//*[name() = "text:p"]')
if len(text_tags): if len(text_tags):
......
...@@ -345,11 +345,11 @@ class TestOOoImport(ERP5TypeTestCase): ...@@ -345,11 +345,11 @@ class TestOOoImport(ERP5TypeTestCase):
mapping = parser.getSpreadsheetsMapping() mapping = parser.getSpreadsheetsMapping()
self.assertEquals(['Feuille1'], mapping.keys()) self.assertEquals(['Feuille1'], mapping.keys())
self.assertEquals(mapping['Feuille1'][0], self.assertEquals(mapping['Feuille1'][0],
[1234.5678]) ['1234.5678'])
self.assertEquals(mapping['Feuille1'][1], self.assertEquals(mapping['Feuille1'][1],
[1234.5678]) ['1234.5678'])
self.assertEquals(mapping['Feuille1'][2], self.assertEquals(mapping['Feuille1'][2],
[0.1]) ['0.1'])
self.assertEquals(mapping['Feuille1'][3], self.assertEquals(mapping['Feuille1'][3],
['2008-11-14']) ['2008-11-14'])
self.assertEquals(mapping['Feuille1'][4], self.assertEquals(mapping['Feuille1'][4],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment