odoo/odoo — pull request #4272 by apineux (2014-12-16 15:19:31+00:00)
Title: Base Import Module - use ustr() instead of str() to avoid traceback with traduction

How to reproduce the issue:
1) install base import module
2) Put french translations
3) import a zip file that contains a ref to an xml_id that don't exist in the current database.

Current result:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 145: ordinal not in range(128)

Expected result:
Error while importing module 'XXXXXX': u"Module loading XXXXX failed: file /tmp/tmpsmWH_j/XXXX/data/ir.model.fields.csv could not be processed:\n Line 36 : Aucun enregistrement trouv\xe9 pour Id. externe 'portal_sale.model_sale_order' dans le champ 'Model'"

The error msg should show us where is the issue in our xml or csv file and not always the same encoding error with u'\xe9'.
P.S.: STR should never be used