[6.1 / trunk] survey module not fully unicode aware
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 1 |
Bug Description
Hello,
When using non-ascii characters in survey answers (for fields of type comment), the surveys cannot be viewed using the "Browse Answer" function.
How to reproduced in 6.1:
1. openerp 6.1 with survey module and demo data
2. Go to Tools > Surveys > Answer Surveys > Answer a Survey
3. Select survey "Initial Partner Feedback"
4. On page 2 enter accents (é, for instance) for question "Why?"
5. clock done
6. Go to Tools > Reporting > Surveys > Browse Answers
7. Select survey "Initial Partner Feedback"
8. click next and you get the following stack trace
OpenERP Server Error
Client Traceback (most recent call last):
File "/opt/openerp/
response[
File "/opt/openerp/
return Model.default_
File "/opt/openerp/
args, kw)
File "/opt/openerp/
result = self.connector.
File "/opt/openerp/
raise xmlrpclib.
Server Traceback (most recent call last):
File "/opt/openerp/
return openerp.
File "/opt/openerp/
result = ExportService.
File "/opt/openerp/
res = fn(db, uid, *params)
File "/opt/openerp/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/
return fct_src(cr, uid, model, method, *args)
File "/opt/openerp/
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/
value[field] = str(que.comment)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128)
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
Reading the code, this also applies to trunk. Changing the title accordingly. These str() calls everywhere in the module can't possibly work.