[FIX] export: decode Field strings before comparisons

Allows exporting fields whose string is a non-ascii *byte*string (rather than unicode).

backport of 7286f4e424 fixing #773 to branch 7.0 by request of @flotho
This commit is contained in:
xmo-odoo 2015-03-06 13:12:50 +01:00
parent 6c9afff057
commit d9c9ac72da
1 changed files with 1 additions and 1 deletions

View File

@ -1481,7 +1481,7 @@ class Export(openerpweb.Controller):
fields['.id'] = fields.pop('id', {'string': 'ID'})
fields_sequence = sorted(fields.iteritems(),
key=lambda field: field[1].get('string', ''))
key=lambda field: openerp.tools.ustr(field[1].get('string', '')))
records = []
for field_name, field in fields_sequence: