count_records
Count records in an Odoo model that satisfy a given domain condition. This tool returns a numeric count, enabling efficient data validation and filter testing without retrieving full records.
Instructions
Count records in an Odoo model matching the domain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model name (e.g., 'res.partner') | |
| domain | No | Odoo search domain (list of conditions). Examples: - Simple: [["active", "=", True]] - Multiple (AND): [["is_company", "=", True], ["country_id", "=", 1]] - OR condition: ["|", ["type", "=", "contact"], ["type", "=", "invoice"]] - any (Odoo 19+): [["order_line", "any", [["product_uom_qty", ">", 5]]]] - Operators: =, !=, >, >=, <, <=, like, ilike, in, not in, child_of, any |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |