Reusable CEL (Common Expression Language) expression editor widget for Odoo forms. Provides a CodeMirror-based editor with syntax highlighting, autocompletion, live validation, and a symbol browser. Used by eligibility rules, program filters, entitlement formulas, and other modules that require expression editing.
- Syntax highlighting: Keywords, operators, strings, and functions are color-coded for readability
- Autocompletion: Press Ctrl+Space to see available fields, functions, and operators for the current profile
- Live validation: Expressions are validated as you type, with inline error highlighting and match counts
- Symbol browser: Browse available fields, CEL variables, library expressions, and functions via a sidebar
- Profile-based context: Automatically loads symbols for registry individuals, groups, entitlements, memberships, or custom profiles
- HTTP API: JSONRPC endpoints for symbol retrieval and validation from frontend or external tools
| Model | Description |
|---|---|
spp.cel.symbol.provider |
Abstract model that extracts symbols for autocompletion and validates expressions |
spp.cel.widget.demo |
Transient wizard for testing the widget (debug mode only) |
After installing, use the widget in any form view by adding
widget="cel_expression" to a text or char field:
<field name="eligibility_expression"
widget="cel_expression"
options="{'cel_profile': 'registry_individuals'}"/>Optional widget parameters:
cel_profile: Profile name (default:registry_individuals)profile_field: Read profile from a field on the recordexpression_type: Expression type (filter, formula, scoring, validation, other)expression_type_field: Read expression type from a fieldoutput_type: Expected output type (boolean, number, string, money)output_type_field: Read output type from a field
- Demo Wizard: Settings > Technical > CEL Widget Demo (debug mode only)
- Widget Usage: Add to any form view with
widget="cel_expression"
- Dynamic Testing: Test expressions with different profiles and see validation results
- By Profile: Test expressions for specific profiles (individuals, groups, entitlements)
- Read-only Mode: Verify the widget displays correctly in readonly mode
- Help: Keyboard shortcuts, features, and example expressions
| Group | Model | Access |
|---|---|---|
| Internal User | HTTP endpoints | Can call widget JSONRPC endpoints (auth="user") |
| Settings | spp.cel.widget.demo |
Full CRUD (read, write, create, delete) |
| Technical Features | Menu visibility | Can see demo menu in Settings > Technical |
All endpoints use JSONRPC authentication (auth="user"):
- ``/spp_cel/symbols/<profile>``: Get symbols for a CEL profile (variables, functions, operators, keywords)
- ``/spp_cel/validate``: Validate expression and return errors, warnings, match count
- ``/spp_cel/profiles``: Get list of available CEL profiles with descriptions
- Inherit
spp.cel.symbol.providerand overrideget_symbols_for_profile()to add custom symbol sources - Use the
CelEditorJavaScript component standalone in client actions for custom editors - Add custom profiles to
spp.cel.registryfor domain-specific contexts - Customize the
_get_model_fields()method to filter which fields appear in autocompletion - Use HTTP endpoints from external tools or custom frontend components
web, spp_cel_domain
Table of contents
- Initial migration to OpenSPP2
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- OpenSPP.org
- OpenSPP
Current maintainers:
This module is part of the OpenSPP/OpenSPP2 project on GitHub.
You are welcome to contribute.




