openerp - Startswith and endswith domain filter in openerp7 -


i know below supported operators openerp7.

  =, !=, >, >=, <, <=, like, ilike, in, not in, child_of, parent_left, parent_right  

i implement startswith , endswith search in openerp. ex

ab* (starts ab) *ab (ends ab) 

is there way openerp framework without executing them sql statements cr.execute(). in global filter.

updating post better clarification

enter image description here

in above post have 1 customer named abc customer. i've searched cu% means starts cu whereas record starts ab still result displayed. in context it's not okay.

and understand =ilike, % not meant place global filter on code (in domain filter). inorder make previous scenario right should do?

thanks insights.

use '=like' , '=ilike' operators.

starts ab [('field','=like','ab%')]

ends ab [('field','=like','%ab')]

use ilike case insensitive match.

like , ilike operators (without '=') automatically add wildcard before , after search value.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -