Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

License: AGPL-3

BI Views builder, based on Materialized or Normal SQL Views

This module extends the functionality of reporting, to support creation of extra custom reports. It allows user to write a custom SQL request. (Generally, admin users)

Once written, a new model is generated, and user can map the selected field with odoo fields. Then user ends the process, creating new menu, action and graph view.

Technically, the module create SQL View (or materialized view, if option is checked). Materialized view duplicates datas, but request are fastest. If materialized view is enabled, this module will create a cron task to refresh the data).

By default, users member of ‘SQL Request / User’ can see all the views. You can specify extra groups that have the right to access to a specific view.

Warning

This module is intended for technician people in a company and for Odoo integrators.

It requires the user to know SQL syntax and Odoo models.

If you don’t have such skills, do not try to use this module specially on a production environment.

Use Cases

this module is interesting for the following use cases

  • You want to realize technical SQL requests, that Odoo framework doesn’t allow (For exemple, UNION with many SELECT) A typical use case is if you want to have Sale Orders and PoS Orders datas in a same table

  • You want to customize an Odoo report, removing some useless fields and adding some custom ones. In that case, you can simply select the fields of the original report (sale.report model for exemple), and add your custom fields

  • You have a lot of data, and classical SQL Views have very bad performance. In that case, MATERIALIZED VIEW will be a good solution to reduce display duration

Configuration

To configure this module, you need to:

  • Go to Settings / Technical / Database Structure / SQL Views

  • tip your SQL request

    /bi_sql_editor/static/description/01_sql_request.png
  • Select the group(s) that could have access to the view

    /bi_sql_editor/static/description/02_security_access.png
  • Click on the button ‘Clean and Check Request’

  • Once the sql request checked, the module analyses the column of the view, and propose field mapping. For each field, you can decide to create an index and set if it will be displayed on the pivot graph as a column, a row or a measure.

    /bi_sql_editor/static/description/03_field_mapping.png
  • Click on the button ‘Create SQL View, Indexes and Models’. (this step could take a while, if view is materialized)

  • If it’s a MATERIALIZED view:
    • a cron task is created to refresh the view. You can so define the frequency of the refresh.

    • the size of view (and the indexes is displayed)

    /bi_sql_editor/static/description/04_materialized_view_setting.png
  • Finally, click on ‘Create UI’, to create new menu, action, graph view and search view.

Usage

To use this module, you need to:

  • Go to ‘Reporting’ / ‘Custom Reports’

  • select the desired report

    /bi_sql_editor/static/description/05_reporting_pivot.png
  • You can switch to ‘Pie’ chart or ‘Line Chart’ as any report,

    /bi_sql_editor/static/description/05_reporting_pie.png
Try me on Runbot

Known issues / Roadmap

  • Add ‘interval’, after type (row/col/measure) field for date(time) fields.

Note

  • If the view is materialized, the name of the action will contain the date and the time of it last refresh:

    /bi_sql_editor/static/description/06_action_datetime_name.png
  • The syntax of the sql request has the following constrains: the name of the selectable columns should be prefixed by x_

Sample:

SELECT name as x_name
FROM res_partner

Bug Tracker

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 smash it by providing detailed and welcomed feedback.

Credits

Contributors

Funders

The development of this module has been financially supported by:

Maintainer

Odoo Community Association

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 https://odoo-community.org.

Metadata

Release files for odoo8-addon-bi-sql-editor 8.0.1.0.0.99.dev20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo8-addon-bi-sql-editor 8.0.1.0.0.99.dev20
File Interpreter ABI Platform
odoo8_addon_bi_sql_editor-8.0.1.0.0.99.dev20-py2-none-any.whl Python 2 none any Details

Release files / odoo8_addon_bi_sql_editor-8.0.1.0.0.99.dev20-py2-none-any.whl

Download URL odoo8_addon_bi_sql_editor-8.0.1.0.0.99.dev20-py2-none-any.whl
Size 558.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
e6bc7ca104a590d56e90646059b6f2093136de960f9852402f60711f5d95a80e
BLAKE2b-256 checksum
How to use checksums
ab5795740ebbe109d95e51caf2e8295adb16b9cbba997b59249f6fd1f0313030
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.5
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page