~unifield-team/unifield-web/reduce_attr_eval

« back to all changes in this revision

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

  • Committer: jf
  • Date: 2011-12-29 09:43:09 UTC
  • Revision ID: jf@tempo4-20111229094309-9hh6f9wq11zzj3f8
[FIX] search view with different views: search and clear

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        proxy = rpc.RPCProxy(model)
82
82
        params.search_text = False
83
83
 
 
84
        # parent's search_view has no business being in m2o or m2m
 
85
        if '_terp_context' in params and 'search_view' in params['_terp_context']:
 
86
            params.get('_terp_context').pop('search_view', None)
 
87
 
84
88
        if text:
85
89
            params.search_text = True
86
90
            ids = proxy.name_search(text, params.domain or [], 'ilike', ctx, False)
178
182
 
179
183
        # Fixed header string problem for m2m,m2o field when parent context takes '_terp_view_name'
180
184
        parent_context.pop('_terp_view_name', None)
181
 
        # parent's search_view has no business being in m2o or m2m
182
 
        parent_context.pop('search_view', None)
183
185
 
184
186
        return dict(domain=ustr(domain), context=ustr(parent_context), group_by = ustr(params.group_by))
185
187