[6.0] unlike the GTK client, web-client doesn't accept fields with accentuated chars
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web Client |
Fix Released
|
High
|
Sananaz (Open ERP) |
Bug Description
Hello,
I think to be truly RAD, Openobject should allow the end user to create new object fields with label in his own language, especially in end user customization or localizations, without the need to deal with all the translation layer (see similar debate here https:/
In the GTK client this works, but not in the we-client.
Try to defined a new sale order field with an accent end display it in the list view or alternatively install the Brazilian localization l10n_br module from here https:/
In the web-client sale order list view you will then get that error:
[23/Aug/
File "/usr/lib/
cherrypy.
File "/usr/lib/
return self.callable(
File "/opt/openerp-
res = func(*args, **kw)
File "/opt/openerp-
return request.handler()
File "/usr/lib/
return self.callable(
File "/opt/openerp-
return fn(*args, **kw)
File "/opt/openerp-
res = func(*args, **kw)
File "/opt/openerp-
'ids': kw.get('id')})
File "/opt/openerp-
report_
File "/opt/openerp-
return execute(action, **data)
File "/opt/openerp-
search_view = data['search_
File "/opt/openerp-
return Form().
File "/opt/openerp-
return fn(*args, **kw)
File "/opt/openerp-
res = func(*args, **kw)
File "/opt/openerp-
form = self.create_
File "/opt/openerp-
return tw.form_
File "/opt/openerp-
res = func(self, *args, **kw)
File "/opt/openerp-
filter_
File "/opt/openerp-
res = func(self, *args, **kw)
File "/opt/openerp-
self.
File "/opt/openerp-
self.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128)
This is because inside self.fields_
However, if the field has been defined directly with a name having non ASCII chars, then it will be a string and it will generate this error.
It's debatable whether the server fields_view_get method should always return unicode of field names no matter if they have translation or not (may be, then it's up to OpenERP S.A. to make that choice). If this is not done in the server, then here is an attached patch that will encode strings to unicode if this has not been done, so that the cmp operator becomes always successful.
Hope this helps.
Hello Raphaël Valyi,
Its fixed in web-client Trunk version. Please update your code and notify us.
Revision-info:
3220 <email address hidden>
Thanks.