~openerp-dev/openobject-client-web/trunk-bug-729354-sma

« back to all changes in this revision

Viewing changes to addons/openerp/controllers/search.py

  • Committer: noz (OpenERP)
  • Date: 2011-03-04 07:29:56 UTC
  • mfrom: (4602.2.2 trunk-bug-728100-noz)
  • Revision ID: noz@tinyerp.com-20110304072956-7l6lg2nkb9rubm9x
[FIX] Parsing Int type for selection widget in search view.

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
                    search_data[field] = value
320
320
 
321
321
                elif 'selection_' in value:
322
 
                    domain.append((field, '=', value.split('selection_')[1]))
323
 
                    search_data[field] = value.split('selection_')[1]
 
322
                    try:
 
323
                        val = int(value.split('selection_')[1])
 
324
                    except:
 
325
                        val = value.split('selection_')[1]
 
326
                                                
 
327
                    domain.append((field, '=', val))
 
328
                    search_data[field] = val
324
329
                else:
325
330
                    if not 'm2o_' in value:
326
331
                        operator = 'ilike'