Pre-alpha. No tagged release and no upgrade path between versions. Use for evaluation and development only, not production.
Core DevPre-alpha

Domain filters

Domains filter records in search, search_read, JSON-RPC, record rules, and list/kanban export windows. Source: sumeru/core/orm/crud_domain.go, domain_json.go.

Shape

A domain is a JSON array of triples [field, operator, value] combined with AND by default.

json
json
[["state", "=", "draft"], ["company_id", "=", 1]]

Supported operators

OperatorMeaning
=Equal
!=Not equal
inValue is array of allowed values
likeSQL LIKE (case-sensitive)
ilikeSQL ILIKE (case-insensitive)
=likeAlias for like

OR composition

Prefix Polish notation: repeat | once per extra OR branch, then list leaf triples.

json
json
["|", ["state", "=", "draft"], ["state", "=", "sent"]]

Two branches → one | prefix. Three branches → two | prefixes, then three triples.

Workspace list views append an OR-of-ilike domain when ?q= is present, searching Char/Text columns visible in the list view.

Not supported

  • >, <, >=, <=
  • Nested boolean trees beyond the OR-prefix pattern above

Plan filters accordingly or post-filter in application code.

Date null checks

For date/datetime fields, use false as the value:

  • ["date_field", "=", false] → IS NULL
  • ["date_field", "!=", false] → IS NOT NULL

ABAC context tokens

Record rules and some domains substitute runtime tokens (resolved at query time):

TokenResolves to
$uidCurrent user id
$company_idActive company id
$company_idsAll companies the user may access

Used heavily in sys.rule domain_force JSON.

XML-id references

Domains in XML or JSON may reference records by XML id; the engine resolves them via sys.model_data before SQL is built.

Examples

RPC search_read — open sales orders:

json
json
{"method": "search_read", "params": {"model": "sale.order", "domain": [["state", "=", "sale"]]}}

Text search — name contains "acme" (case-insensitive):

json
json
[["name", "ilike", "%acme%"]]

Record rule — own company only:

json
json
[["company_id", "in", "$company_ids"]]

Export window — list/kanban exports apply the window action domain (max 500 rows).

See also