ERPGAP Blog / Odoo Domain Operators
Odoo Domain Operators

Odoo Domain Operators


How Odoo queries for records inside it's ORM


Odoo Domain Expressions use Reverse Polish Notation

This list will give you examples of usage of several operators

Do you have a specific question?

Talk to Us


'like' operator

[('input', 'like', 'open')]

Returns case sensitive (wildcards - '%open%') search. O/p: open, opensource, openerp, Odooopenerp


'not like' operator

[('input', 'not like', 'open')]

Returns results not matched with case sensitive (wildcards - '%open%') search.

O/p: Openerp, Opensource, Open, Odoo, odoo, OdooOpenerp


'=like' operator

'=like': [('name', '=like', 'open')]

Returns exact (= 'open') case sensitive search.

O/p: open


'ilike' operator

'ilike': [('name', 'ilike', 'open')]

Returns exact case insensitive (wildcards - '%open%') search.

O/p: Openerp, openerp, Opensource, opensource, Open, open, Odooopenerp, OdooOpenerp


'not like' operator

'not ilike': [('name', 'not ilike', 'open')]

Returns results not matched with exact case insensitive (wildcards - '%open%') search.

O/p: Odoo, odoo


'=ilike' operator

'=ilike': [('name', '=ilike', 'open')]

Returns exact (= 'open' or 'Open') case insensitive search.

O/p: Open, open


'=?' operator

'=?': name = 'odoo' parent_id = False [('name', 'like', name), ('parent_id', '=?', parent_id)]

Returns name domain result & True

name = 'odoo' parent_id = 'openerp' [('name', 'like', name), ('parent_id', '=?', parent_id)]

Returns name domain result & parent_id domain result '=?' is a short-circuit that makes the term TRUE if right is None or False, '=?' behaves like '=' in other cases


'in', 'not in' operator

'in': [('value1', 'in', ['value1', 'value2'])] - in operator will check the value1 is present or not in list of right term

'not in': [('value1', 'not in', ['value2'])] - not in operator will check the value1 is not present in list of right term While these

'in' and 'not in' works with list/tuple of values, the latter  '=' and '!=' works with string

Need Odoo?



'=', '!=' operators

'=': value = 10 [('value','=',value)] - term left side has 10 in db and term right our value 10 will match

'!=': value = 15 [('value','!=',value)] - term left side has 10 in db and term right our value 10 will not match

'child_of' operator

'child_of': parent_id = '1' #Agrolait 'child_of': [('partner_id', 'child_of', parent_id)]

return left and right list of partner_id for given parent_id


{"'<='"}, {"'<'"}, {"'>'"}, {"'>='"} operators

'<=', '<', '>', '>=': These operators are largely used in openerp for comparing dates

[('date', '>=', date_begin), ('date', '<=', date_end)]. You can use these operators to compare int or float also.

Want to find out about more Odoo features and solutions?

Browse Guides & Articles


Other articles



Vue Storefront is now Alokai - What’s new?

Vue Storefront is now Alokai - What’s new?

How can Odoo help you to keep up with AI advancements?

How can Odoo help you to keep up with AI advancements?

Managing Your Manufacturing Overhead Costs

Managing Your Manufacturing Overhead Costs

About us

Odoo is a management software that fits all sizes. This software is for small, medium and large companies. Your company's information is all in one place. You don't have to go back and forth to check something. All apps have real-time access to your database.

Tags tags icon