BI SQL Editor
(0)
233
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

Installation

  • You must put this module as server_wide_modules in your odoo configuration file or add ‘–load=bi_sql_editor’ if you start odoo in command line.

Configuration

To configure this module, you need to:

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

  • tip your SQL request

    https://raw.githubusercontent.com/OCA/reporting-engine/12.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/12.0/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.

    https://raw.githubusercontent.com/OCA/reporting-engine/12.0/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)
    https://raw.githubusercontent.com/OCA/reporting-engine/12.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 ‘Reporting’ / ‘Custom Reports’
  2. Select the desired report
https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/05_reporting_pivot.png
  • You can switch to ‘Pie’ chart or ‘Line Chart’ as any report,

    https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/05_reporting_pie.png

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