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
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
Post a Comment