count_records
Count records in an Odoo model using search domain filters to retrieve specific data quantities for analysis or reporting.
Instructions
Count records in an Odoo model matching the domain.
Args: model: Model name (e.g., 'res.partner') domain: 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
Returns: JSON string with the count
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| domain | No |