← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 843840] [NEW] Translation of operators in custom filter causes exception

 

Public bug reported:

Hello,

When the translation of the name of the operator in the custom filter widget contains a non us-ascii character, the get_value method throws an exception and the filter does not work. this behaviour was observed on the following platforms: windows 2008 server, macos x 10.6, macos x 10.7, debian linux 10, and is 100% reproducable.
the version of the client tested was 6.0.2 and 6.0.3


This can be reproduced with a german gtk client and the filters "enthält" (contains), "enthält nicht" (doesn't contain), "größer als" (greater than).

A simple fix I did was in 
folder "search_widget", file "custom_filter.py", method "get_value"

to use an iterated index where the list 
self.op_selection
is populated instead of the translated string, and further down use .get_active() instead of .get_active_text() to get the correct operator value from the self.op_selection list.

As this might be a basic problem with translations and similar handling,
I can imagine that a more robust fix is possible.

hope I helped

best regards

ulrik

** 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/843840

Title:
  Translation of operators in custom filter causes exception

Status in OpenERP GTK Client:
  New

Bug description:
  Hello,

  When the translation of the name of the operator in the custom filter widget contains a non us-ascii character, the get_value method throws an exception and the filter does not work. this behaviour was observed on the following platforms: windows 2008 server, macos x 10.6, macos x 10.7, debian linux 10, and is 100% reproducable.
  the version of the client tested was 6.0.2 and 6.0.3

  
  This can be reproduced with a german gtk client and the filters "enthält" (contains), "enthält nicht" (doesn't contain), "größer als" (greater than).

  A simple fix I did was in 
  folder "search_widget", file "custom_filter.py", method "get_value"

  to use an iterated index where the list 
  self.op_selection
  is populated instead of the translated string, and further down use .get_active() instead of .get_active_text() to get the correct operator value from the self.op_selection list.

  As this might be a basic problem with translations and similar
  handling, I can imagine that a more robust fix is possible.

  hope I helped

  best regards

  ulrik

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client/+bug/843840/+subscriptions


Follow ups

References