← Back to team overview

openerp-india team mailing list archive

[Bug 1204725] [NEW] User unicode character in name, shows error when opening form.

 

You have been subscribed to a public bug:

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.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
User unicode character in name, shows error when opening form.
https://bugs.launchpad.net/bugs/1204725
You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Addons.