SQL Request Abstract
sql_request_abstract · OCA/reporting-engine
OCA/server-tools 8.0–14.0 → OCA/reporting-engine 15.0–19.0
-
Security25/25No findings
-
Activity20/25Last human commit 10 months ago
-
Required by15/251 module depends on it
-
Maturity25/25In 12 Odoo series since 8.0
Heuristic over the facts below, not an audit · How it's computed
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.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- bi_sql_editor
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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
-
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…
Loading…