Comment 3 for bug 980770

Revision history for this message
Dewinne Julien (julien-dewinne) wrote :

Hi,

We have found a correction to this bug.

If we modify the file "ea_import_chain.py" like this:

line 82:

    def file_to_list(self, cr, uid, ids, context={}):
        result = []
        cpt=0
        for chain in self.browse(cr, uid, ids, context={}):
            input_file = StringIO(base64.b64decode(chain.input_file))
            for string_record in input_file:
                line = []
 + string_record=string_record.decode('latin-1')
                for field_string in string_record.split(chain.separator):
                    field_string.encode('latin-1')
                    delimiter = chain.delimiter and chain.delimiter + "\n\r" or "\n\r"
                    line.append(field_string.strip(delimiter))
                result.append(line)
        return result

With that, the accents is correctly imported in the DB.