The domain in OE is mostly used for Custom Search conditions.
A single condition in domain is a triple consisting of three elements. The first is a column of the object, that is, the field name; the second is the comparison operator ''= ,! =, & Gt;, >=, <, & lt; =, like, Ilike, in, not in, child_of, parent_left, parent_right ''; the third is the value used for comparison. Use "|" (OR), "&" (and), and "!" for multiple conditions. (No) logical operator link. Logical operators are prefixed before conditions. "|" And "&" must be linked to two conditions, "!" Returns the inverse of a condition. The default logical operator is "&".
For example:
['|', '|', ('Group _ id', 'in', [G. ID for G in user. groups_id]), ('user _ id', '=', user. ID), '&', ('user _ id', '=', false), ('group _ id', '=', false), '| ', '|', ('Company _ id', '=', false), ('Company _ id', 'Child _ of ', [user. company_id.id]), ('Company _ id. child_ids ', 'Child _ of', [user. company_id.id])]
This example indicates:
['| ',
'|', ('Group _ id', 'in', [G. ID for G in user. groups_id]), ('user _ id', '=', user. ID ),
'&', ('User _ id', '=', false), ('group _ id', '=', false ),
'| ',
'|', ('Company _ id', '=', false), ('Company _ id', 'Child _ of ', [user. company_id.id]),
('Company _ id. child_ids ', 'Child _ of', [user. company_id.id])]
Easy to read:
('Group _ id', 'in', [G. ID for G in user. groups_id]) or ('user _ id', '=', user. ID) or ('user _ id', '=', false) and ('group _ id', '=', false )) or ('Company _ id', '=', false) or ('Company _ id', 'Child _ of ', [user. company_id.id]) or ('Company _ id. child_ids ', 'Child _ of', [user. company_id.id])