c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #21239
[Bug 752531] [NEW] Filter search - localization problem
Public bug reported:
Using OpenERP 6.1-dev on Ubuntu 10.04
1) Steps to reproduce the issue
- Translate filters to use non-english characters (e.g. in croatian 'contains' = 'sadržava', '>' = 'veće od', etc.)
- Try to use localized filter, e.g. in Translations: name 'sadržava' aaa
2) Observed result:
Traceback (most recent call last):
File "/home/user/gtk-client/openobject-client/bin/widget/screen/screen.py", line 231, in search_filter
val = self.filter_widget and self.filter_widget.value or {}
File "/home/user/gtk-client/openobject-client/bin/widget_search/form.py", line 440, in _value_get
filters = x[0].value
File "/home/user/gtk-client/openobject-client/bin/widget_search/custom_filter.py", line 115, in _value_get
self.widget_obj.selected_oper = self.op_selection[self.widget_obj.selected_oper_text]
KeyError: 'sadr\xc5\xbeava'
3) Expected result:
- Filter works - no records found
Other specifics are not required, as the problem is in /bin/widget_search/custom_filter.py, in method _value_get, line 114:
self.widget_obj.selected_oper_text = self.combo_op.get_active_text()
should be:
self.widget_obj.selected_oper_text = unicode(self.combo_op.get_active_text())
because in the following line expected string (self.widget_obj.selected_oper_text) must be unicode:
self.widget_obj.selected_oper = self.op_selection[self.widget_obj.selected_oper_text]
** Affects: openobject-client
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/752531
Title:
Filter search - localization problem
Status in OpenERP GTK Client:
New
Bug description:
Using OpenERP 6.1-dev on Ubuntu 10.04
1) Steps to reproduce the issue
- Translate filters to use non-english characters (e.g. in croatian 'contains' = 'sadržava', '>' = 'veće od', etc.)
- Try to use localized filter, e.g. in Translations: name 'sadržava' aaa
2) Observed result:
Traceback (most recent call last):
File "/home/user/gtk-client/openobject-client/bin/widget/screen/screen.py", line 231, in search_filter
val = self.filter_widget and self.filter_widget.value or {}
File "/home/user/gtk-client/openobject-client/bin/widget_search/form.py", line 440, in _value_get
filters = x[0].value
File "/home/user/gtk-client/openobject-client/bin/widget_search/custom_filter.py", line 115, in _value_get
self.widget_obj.selected_oper = self.op_selection[self.widget_obj.selected_oper_text]
KeyError: 'sadr\xc5\xbeava'
3) Expected result:
- Filter works - no records found
Other specifics are not required, as the problem is in /bin/widget_search/custom_filter.py, in method _value_get, line 114:
self.widget_obj.selected_oper_text = self.combo_op.get_active_text()
should be:
self.widget_obj.selected_oper_text = unicode(self.combo_op.get_active_text())
because in the following line expected string (self.widget_obj.selected_oper_text) must be unicode:
self.widget_obj.selected_oper = self.op_selection[self.widget_obj.selected_oper_text]
Follow ups
References