TIP: You can type at any time to perform a new search.
SQL Views
sql_view · OCA/server-tools
Security findings
Migration considerations
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools.translate` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools.translate` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- For a target of Odoo 10.0+: use the `__manifest__.py` manifest name instead of `__openerp__.py`. The filename alone does not establish module age or compatibility. migration-openerp-manifest · source
SQLView— Class 'SQLView' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceSQLView— Class 'SQLView' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceSQLViewCSVPreview— Class 'SQLViewCSVPreview' still inherits from the old-style `orm.TransientModel` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceSQLViewCSVPreview— Class 'SQLViewCSVPreview' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceSQLViewCSVPreview— Class 'SQLViewCSVPreview' declares `_defaults` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceview_sql_view_csv_preview_form— For a target of Odoo 17.0+: view 'view_sql_view_csv_preview_form' uses `attrs=`/`states=`, which are no longer supported. Convert modifiers to direct Python boolean expressions in `invisible`/`readonly`/`required`; preserve the original AND/OR logic. migration-view-attrs-states · sourceview_sql_view_tree— View 'view_sql_view_tree' is defined with a `<tree>` root tag: renamed to `<list>` in Odoo 18.0. migration-view-tree-tag · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- 1.0
- Category
- Tools
- Folder size
- 0.03 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://www.camptocamp.com
- Last tracking update
- 2026-08-07 06:56:12
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp, Odoo Community Association (OCA)
- Committers
- Stefan Rijnhart, Guewen Baconnier
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- unicodecsv
- System dependencies
- None
- Required by
- None
- Description
========= SQL Views ========= This addon allows to create SQL views on the database. It also features a simple CSV export of the views to check their result. Usage ===== To create new SQL views, you need to go to ``Settings > Technical > Database Structure > SQL Views``. Give a view a human name, a SQL name (which will be prefixed with ``sql_view_`` in the database, and the definition of the view itself (without trailing semicolon). Known issues / Roadmap ====================== The CSV preview can be used to read any data on the database. So this menu **must** be accessible only by allowed admin users. By default, the module is configured to be accessible only by users having the ``Settings`` administration level. Bug Tracker =========== Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback `here <https://github.com/OCA/server-tools/issues/new?body=module:%20sql_view%0Aversion:%207.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. Credits ======= Contributors ------------ * Guewen Baconnier <guewen.baconnier@camptocamp.com> Maintainer ---------- .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org This module is maintained by the OCA. OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. To contribute to this module, please visit http://odoo-community.org.
Code Analysis
Views touched (4)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_sql_view_csv_preview_form |
sql.view.csv.preview.form | sql.view.csv.preview | form | New |
view_sql_view_form |
sql.view.form | sql.view | form | New |
view_sql_view_search |
sql.view.filter | sql.view | search | New |
view_sql_view_tree |
sql.view.tree | sql.view | tree | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (2)
New fields (0)
No new fields.
Public methods (4)-
create(self, cr, uid, vals, context=None) -
onchange_sql_name(self, cr, uid, ids, sql_name, context=None) -
unlink(self, cr, uid, ids, context=None) -
write(self, cr, uid, ids, vals, context=None)
New fields (0)
No new fields.
Public methods (1)-
export_csv(self, cr, uid, ids, context=None)