BI SQL Editor
(0)
166
GRAP

BI SQL Editor

FREE
Technical name
bi_sql_editor
License
AGPL-3
Secure dependencies
N/A
BI SQL Editor

BI SQL Editor

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

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

Table of contents

Configuration

  • Go to Dashboard / Configuration / SQL Views

  • tip your SQL request

    https://raw.githubusercontent.com/OCA/reporting-engine/16.0/bi_sql_editor/static/description/01_sql_request.png
  • Select the group(s) that could have access to the view

    https://raw.githubusercontent.com/OCA/reporting-engine/16.0/bi_sql_editor/static/description/02_security_access.png

Optionnaly, you can add a domain.

A tipical domain in a multi company context is to write ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] to make reporting depending on the current companies of the user.

  • Click on the button ‘Validate SQL Expression’

  • 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.

    https://raw.githubusercontent.com/OCA/reporting-engine/16.0/bi_sql_editor/static/description/03_field_mapping.png
  • Click on the button ‘Create SQL elements’. (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)
    https://raw.githubusercontent.com/OCA/reporting-engine/16.0/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:

  1. Go to ‘Dashboards > SQL Reports’
  2. Select the desired report
https://raw.githubusercontent.com/OCA/reporting-engine/16.0/bi_sql_editor/static/description/05_reporting_pivot.png
  • You can switch to ‘Graph’ or ‘tree’ views as any report.

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

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • GRAP

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

Current maintainer:

legalsylvain

This module is part of the OCA/reporting-engine project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

0.0 / 5.0
based on 0 ratings

Python dependencies

Package Version Secured
psycopg2_binary 2.8.6

Available languages

Language % translated
Italian / Italiano
100%
Japanese / 日本語
100%
French / Français
72%
Spanish (AR) / Español (AR)
70%
Slovenian / slovenščina
56%
German / Deutsch
17%
Turkish / Türkçe
10%
Turkish / Türkçe
8%
Finnish / Suomi
7%
Spanish (MX) / Español (MX)
7%
Dutch / Nederlands
7%
Chinese (Simplified) / 简体中文
7%
Hungarian / Magyar
7%
Portuguese / Português
7%
Portuguese / Português
7%
Portuguese (BR) / Português (BR)
7%
Croatian / hrvatski jezik
7%
Spanish (VE) / Español (VE)
6%
Swedish / Svenska
6%
Arabic / الْعَرَبيّة
6%
Romanian / română
6%
Croatian / hrvatski jezik
6%
Polish / Język polski
6%
Bulgarian / български език
5%
Spanish (DO) / Español (DO)
5%
Dutch (BE) / Nederlands (BE)
5%
Norwegian Bokmål / Norsk bokmål
5%
Hebrew / עִבְרִי
5%
Indonesian / Bahasa Indonesia
5%
Persian / فارس
5%
Ukrainian / українська
5%
French (CA) / Français (CA)
5%
Spanish (PE) / Español (PE)
5%
French (CH) / Français (CH)
5%
Bosnian / bosanski jezik
5%
English (UK)
5%
Spanish / Español
5%
Dutch / Nederlands
5%
Mongolian / монгол
5%
Spanish (CL) / Español (CL)
5%
Macedonian / македонски јазик
5%
Spanish (EC) / Español (EC)
5%
Thai / ภาษาไทย
5%
Russian / русский язык
5%
Spanish / Español
5%
Estonian / Eesti keel
5%
Spanish (CO) / Español (CO)
5%
Chinese (Traditional) / 繁體中文
5%
Serbian (Latin) / srpski
5%
Slovak / Slovenský jazyk
5%
Vietnamese / Tiếng Việt
5%
Vietnamese / Tiếng Việt
4%
Spanish (PY) / Español (PY)
4%
Latvian / latviešu valoda
4%
Greek / Ελληνικά
4%
Spanish (CR) / Español (CR)
4%
Lithuanian / Lietuvių kalba
3%
Lithuanian / Lietuvių kalba
3%
Galician / Galego
0%
Galician / Galego
0%