User unicode character in name, shows error when opening form.

Bug #1204725 reported by Ricardo Balcácer
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 1

Bug Description

There is a problem creating a user with a character that is not in the 7-bit ASCII list inside the login. For example accented characters in spanish produce the problem. You can create the user the problem arises once you try to access the form of the user again, the following error appears :

...

File "/usr/lib/python2.6/site-packages/openerp-7.0_20130716_231027-py2.6.egg/openerp/addons/auth_signup/res_users.py", line 87, in _get_signup_url_for_action res[partner.id] = urljoin(base_url, "?%s#%s" % (urlencode(query), urlencode(fragment))) File "/usr/lib/python2.6/urllib.py", line 1269, in urlencode v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa1' in position 0: ordinal not in range(128)

After giving it some thought I believe I understand the problem, the textbox in creating a new user let's me add an entry with characters over 0x80 which are outside the 7-bit ASCII, now the database is already in UTF-8 so no problem there the problem occurs on the web client when it tries to read the value by passing throught the 'str()' which throws the error. In any case or the validation when creating the user should filter this or maybe it should use 'unicode()' instead of 'str()'. Seems like a design decision, hope this information helps.

Related branches

description: updated
description: updated
affects: openerp-server (Ubuntu) → openerp-web
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :
affects: openerp-web → openobject-addons
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jaydeep Barot(OpenERP) (jaydeep.barot-openerp) wrote :

Hello,

I have Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1204725-jar
Revision ID: <email address hidden>
revision no :- 8877

Thanks,
Jaydeep Barot.

Revision history for this message
Alexandre Allouche (alexandre-allouche) wrote :

Hello R&D team,

This is an easy fix for a very annoying bug. Could you look into a merge into 7.0 ?
We have many situations where authentification is delegated to a ldap / Active Directory having accentuated logins.

Thank for your consideration

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.