| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 91 |
| Technical Name |
dynamic_search_config |
| License | LGPL-3 |
# Dynamic Search Config
Configure native filterable and groupable fields per model using JSON stored in ir.config_parameter.
## What this module does
- Adds a settings field to store JSON config in Odoo system parameters.
- Overrides native fields_get() attributes used by Odoo search: - searchable for filterable fields - sortable for groupable fields
- Does not create/update search views and does not inject XML architecture.
## Where configuration is stored
- Table: ir_config_parameter
- Key: dynamic_search_config.model_fields
## How to configure
- Go to Settings.
- Open the section Dynamic Search Config.
- In Dynamic Search Fields JSON, paste your JSON.
- Save.
## JSON format
- "model.name": {
- "filterable": ["field_a", "field_b"], "groupable": ["field_c", "field_d"]
}
}
### Example for res.partner
- "res.partner": {
- "filterable": ["name", "email", "phone"], "groupable": ["company_type", "country_id", "user_id"]
}
}
## Validation rules
- Root must be a JSON object.
- Each key must be a model name string.
- Each model value must be an object.
- filterable and groupable must be lists of strings.
## Notes
- For configured models, this module applies a whitelist behavior: - only fields in filterable remain searchable - only fields in groupable remain sortable/groupable
Please log in to comment on this module