~cag/openobject-client/cag-6.0-dev

« back to all changes in this revision

Viewing changes to bin/widget_search/custom_filter.py

  • Committer: mark doukidis
  • Date: 2012-05-30 07:04:27 UTC
  • mfrom: (1909.5.24 openobject-client)
  • Revision ID: mark@cgbs.com.au-20120530070427-22hkrzz68pycu6lz
[MERGE] from stable 6.0 as at 30/05/2012

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
                right_text_se =  self.right_text.get_text()
150
150
                keys = []
151
151
                for selection in self.field_selection[self.combo_fields.get_active_text()][2]:
152
 
                    if selection[1].lower().find(right_text_se.lower()) != -1:
153
 
                        keys.append(selection[0])
 
152
                    try:
 
153
                        if (selection[1].decode('utf-8')).lower().find((right_text_se.decode('utf-8')).lower()) != -1:
 
154
                            keys.append(selection[0])
 
155
                    except:
 
156
                        if selection[1].lower().find(right_text_se.lower()) != -1:
 
157
                            keys.append(selection[0])
154
158
                right_text = keys
155
159
                if operator in ['ilike','=','in']:
156
160
                    operator = 'in'