Vinay Rana (openerp) (vra-openerp) has assigned this bug to you for OpenERP GTK
Client:
Hello,
This happens with the gtk client 6.0 (revno 1868).
To reproduce it, you need a selection field in a editable tree view.
For example, add editable="bottom" in the attendances tree view and set your
client in french.
The "Sign In" choice becomes "Pointer l'entrée".
When you select this value in the selection field, as soon as you left
the field, it becomes empty.
This is displayed in the logs :
/opt/client_60/bin/widget/view/tree_gtk/parser.py:630: UnicodeWarning: Unicode
equal comparison failed to convert both arguments to Unicode - interpreting
them as being unequal
if txt[:len(text)].lower() == text.lower():
In the widget method
def value_from_text(self, model, text):
selection = self.attrs['selection']
text = tools.ustr(text)
res = False
for val, txt in selection:
if txt[:len(text)].lower() == text.lower():
if len(txt) == len(text):
return val
res = val
return res
Variables are equal to :
txt : "Pointer l'entr\xc3\xa9e"
text parameter input : "Pointer l'entr\xc3\xa9e"
text after tools.ustr u"Pointer l'entr\xe9e"
A unicode conversion is done on the text, but it is compared to a non-
unicode string so the selection is never found.
So, the fix is either not to convert the variable, or to convert the
two.
A patch is attached.
Thanks
Guewen
** Affects: openobject-client
Importance: Medium
Assignee: OpenERP sa GTK client R&D (openerp-dev-gtk)
Status: Confirmed
--
Special chars in selection fields can not be selected on editable tree
https://bugs.launchpad.net/bugs/806342
You received this bug notification because you are a member of OpenERP sa GTK
client R&D, which is a bug assignee.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp