TIP: You can type at any time to perform a new search.
SQL Request Abstract
sql_request_abstract · OCA/reporting-engine
- Repository
- OCA/reporting-engine · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Tools
- Folder size
- 0.79 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/reporting-engine
- Last tracking update
- 2026-08-07 09:06:34
- Authors
- Akretion, Odoo Community Association (OCA), GRAP
- Maintainers
- Akretion, Odoo Community Association (OCA), GRAP
- Committers
- Weblate, Franco Leyes, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- bi_sql_editor
- Description
This module provides an abstract model to manage SQL Select requests on database. It is not usefull for itself. You can see an example of implementation in the 'sql_export' module. (same repository). ## Implemented features - Add some restrictions in the sql request: - you can only read datas. No update, deletion or creation are possible. - some tables are not allowed, because they could contains clear password or keys. For the time being ('ir_config_parameter'). - The request can be in a 'draft' or a 'SQL Valid' status. To be valid, the request has to be cleaned, checked and tested. All of this operations can be disabled in the inherited modules. - This module adds two new groups: - SQL Request / User : Can see all the sql requests by default and execute them, if they are valid. - SQL Request / Manager : has full access on sql requests.
Code Analysis ⓘ
Views touched (2)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_sql_request_mixin_form |
sql.request.mixin | form | New | |
view_sql_request_mixin_tree |
sql.request.mixin | list | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (1)
New fields (8)
-
group_idsMany2many → res.groupscolumn1='sql_id'column2='group_id'comodel_name='res.groups'default=<expr>relation=_sql_request_groups_relationstring='Allowed Groups' -
has_group_changedBooleancopy=Falsehelp='Technical fields, used in modules that depends on this one to know if groups has changed, and that according access should be updated.' -
nameCharrequired=True -
noteHtml -
queryTexthelp="You can't use the following words: DELETE, DROP, CREATE, INSERT, ALTER, TRUNCATE, EXECUTE, UPDATE."required=True -
stateSelectiondefault='draft'help="State of the Request:\n * 'Draft': Not tested\n * 'SQL Valid': SQL Request has been checked and is valid"selection=STATE_SELECTION -
use_external_databaseBooleanhelp='If filled, the query will be executed against an external database, configured in Odoo main configuration file. ' -
user_idsMany2many → res.userscolumn1='sql_id'column2='user_id'comodel_name='res.users'default=<expr>relation=_sql_request_users_relationstring='Allowed Users'
-
button_preview_sql_expression(self) -
button_set_draft(self) -
button_validate_sql_expression(self) -
check_external_config(self)@api.constrains('use_external_database') -
onchange_group_ids(self)@api.onchange('group_ids')
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…