Search 1.9 billion lines of Odoo code on GitHub

bi_sql_editor

Author: GRAP,Odoo Community Association (OCA)
License: AGPL-3
Branch: 13.0
Repository: acsone/reporting-engine
Dependencies: base, and sql_request_abstract
Languages: HTML (453, 2.1%), PO File (19726, 91.7%), Python (831, 3.9%), XML (321, 1.5%), and reStructuredText (183, 0.9%)
Other branches: 10.0, 10.0-backport-report_csv-lmi, 11.0, 11.0-header_footer_xlsx, 12.0, 12.0-prg_master, 12.0-ref_report_py3o_python_3.9-mle, 12.0-report_substitute_generate_email-qgr, 13.0-imp_report_qweb_signer_allowed_reports_tbi, 13.0-mig_report_substitute, 13.0-ref_report_py3o_python_3.11_tbi, 13.0-report_qweb_element_page_visibility, 13.0-slg_master, 14.0, 14.0-imp_report_qweb_signer_allowed_reports_tbi, 14.0-mig-report_py3o, 14.0-mig-report_py3o_fusion_server, 14.0-update-dotfiles-sbi, 15.0-mig-report_csv-ape, 16.0, 8.0, 9.0, 9.0-report-custom-filename-fix, 9.0-report_py3o, 9.0-slg_master, add-report_py3o_signer-lco, and imp-temp-remove-java-in-manifest-lco
Other repositories: 001101/reporting-engine, AITIC/reporting-engine, Aabcrow/reporting-engine, AcruxLab/reporting-engine, AdriaGForgeFlow/reporting-engine, Ahmad-Hamouda/reporting-engine, Albin-John/reporting-engine, Alfa-90/reporting-engine, App247/reporting-engine, AsierSV/reporting-engine, AwesomeFoodCoops/odoo-production, Bubbles-IT/reporting-engine, CB-Gran-Canaria/reporting-engine, CGenie/reporting-engine, CMR-tetra/reporting-engine, Cayprol/reporting-engine, Change2improve/reporting-engine, ClancyQiao/reporting-engine, ClearCorp/oca-reporting-engine, ComitorDevTeam/reporting-engine, Comunitea/reporting-engine, DITIntl/odoo-production, DamonLiu0814/reporting-engine, Darknroses/reporting-engine, Digital5-Odoo/reporting-engine, Dobtor-OCA/reporting-engine, Domatix/reporting-engine, DudhatShivam/reporting-engine, EBII/reporting-engine, ERPLibre/reporting-engine, EssentNovaTeam/reporting-engine, FedericoLaTorre/patches, Fitranugraha/reporting-engine, ForgeFlow/reporting-engine, Gabinete-Digital/reporting-engine, Glue-Software-Engineering-AG/reporting-engine, Gofekra/reporting-engine, Groupe-Informatique-LaCoopSurMer/odoo-production, GrupoAlvamex/reporting-engine, Guobower/reporting-engine, Hamza-Talibi/reporting-engine, HarshalBhoir/reporting-engine, HomerDeoDatu/reporting-engine, Infinityloopsistemas/reporting-engine, Ingeos/reporting-engine, Jarsa/reporting-engine, JasonJun1/reporting-engine, Jeisonpernia/reporting-engine, JoJoJoJoJoJoJo/reporting-engine, Kayuulab/reporting-engine, KonosCL/reporting-engine, LeGittan/reporting-engine, Leuan12/reporting-engine, Maartincm/reporting-engine, MathBenTech/reporting-engine, Mefistous/reporting-engine, NachoAlesLopez/reporting-engine, NeatNerdPrime/reporting-engine, NextERP-Romania/reporting-engine, Noviat/reporting-engine, Nubeo-be/reporting-engine, OCA-MUK/reporting-engine, OCA/reporting-engine, ORETEK/reporting-engine, OpenCode/reporting-engine, OpenPymeMx/reporting-engine, Otsokop/odoo-production, OutillageStEtienne/reporting-engine, Palpid/reporting-engine, PrenorSistemas/reporting-engine, QubiQ/reporting-engine, RL-OtherApps/patches, Rad0van/reporting-engine, RealSolutionsLux/reporting-engine, SHEFFIELDAFRICA/reporting-engine, SanteLibre/reporting-engine, Saran440/reporting-engine, SequarSrl/reporting-engine, SerpentConsultingServices/reporting-engine, SeuMarco/reporting-engine, ShakirMemon786/reporting-engine, SimoRubi/reporting-engine, SolutionSeekers/reporting-engine, SportPursuit/reporting-engine, StefanRijnhart/reporting-engine, Studio73/reporting-engine, Syci-Consulting/reporting-engine, TRESCLOUD/reporting-engine, Tatider/reporting-engine, Tecnativa/reporting-engine, Tonow-c2c/reporting-engine, VanMoof/reporting-engine, Vauxoo/reporting-engine, VisiionSolucionesTecnologicas/reporting-engine, VitalPet/reporting-engine, WilldooIT/reporting-engine, Zio-Overload/reporting-engine, aaltinisik/reporting-engine, abs44/reporting-engine, adhoc-dev/oca-reporting-engine, adhoc-dev/reporting-engine, ajaychauhan727/reporting-engine, ajinvn2019/reporting-engine, akretion/reporting-engine, akshayksolves/reporting-engine, alesisjoan/reporting-engine, alessavindell/reporting-engine, algiopensource/reporting-engine, allanaguilar/reporting-engine, amendoncabh/reporting-engine, andhit-r/reporting-engine, anhvu-sg/reporting-engine, anos4444/reporting-engine, apachesep/reporting-engine, apetbiz/reporting-engine, aravinthu/reporting-engine, aremili/reporting-engine, arfie/reporting-engine, atonaltzin/reporting-engine, augustynr/reporting-engine, aurestic/reporting-engine, azmeuk/odoo-production, bacgdev/reporting-engine, bacgroup/reporting-engine, beenhere4hours/reporting-engine, bishalgit/reporting-engine, blooparksystems/reporting-engine, bmya/reporting-engine-1, brain-tec/reporting-engine, budisentosa/reporting-engine, camptocamp/reporting-engine, cataclysmic/reporting-engine, chenjingxiong/reporting-engine, chetanrdhaduk/odoo-production, christophe-hanon/reporting-engine, ciel-it/reporting-engine, cogitoweb/reporting-engine, coopiteasy/reporting-engine, damendieta/reporting-engine, dani-xtendoo/reporting-engine, daramousk/reporting-engine, darshan-odoo/reporting-engine, dcorio/reporting-engine, ddico/reporting-engine, detian08/reporting-engine, dev00007/reporting-engine, diagramsoftware/reporting-engine, diegobgl/reporting-engine, dominiquekonsuntack/reporting-engine, dong-z/reporting-engine, dorsaf/reporting-engine, druidoo-dev/reporting-engine, druidoo/FoodCoops, dupski/reporting-engine, dzungtran89/odoo-production, ecosoft-odoo/reporting-engine, eezee-it/reporting-engine, elperrofarelo/reporting-engine, enocare/reporting-engine, estevebadia/odoo-production, etobella/reporting-engine, exosoftware/oca-reporting-engine, ezodoo/reporting-engine, fabiomix/reporting-engine, fateenvoy/reporting-engine, fauzi-tsani/reporting-engine, fengzoo2018/patches, feriosvega/reporting-engine, flachica/reporting-engine, fmdl/reporting-engine, fugui0310/reporting-engine, gaanto/reporting-engine, gastonfeng/reporting-engine, gbertolani/reporting-engine, gdgellatly/reporting-engine, germanponce/reporting-engine, gonza3001/reporting_engine, govorushagreat/reporting-engine, goyugo/reporting-engine, grap/reporting-engine, gurneyalex/reporting-engine, hanelsofterp/reporting-engine, haroldtamo/reporting-engine, hbrunn/reporting-engine, henrycoding/reporting-engine, hippe-67/reporting-engine, hisyam44/reporting-engine, hmrodrigues/reporting-engine, holgedchen/reporting-engine, iamyeonhan/reporting-engine, ifadhf/reporting-engine, ilyasProgrammer/reporting-engine, ingadhoc/patches, initOS/reporting-engine, isoscl/patches, it-projects-llc/reporting-engine, izzihector/reporting-engine, j209/reporting-engine, jacky82669513/reporting-engine, jaferrer/reporting-engine, jarroyomorales/reporting-engine, jason156/reporting-engine, jesusVMayor/reporting-engine, jffernandez/reporting-engine, jlzhou/reporting-engine, jnaudon/reporting-engine, johnbendi/reporting-engine, julenalgios/reporting-engine, kararaMohamed/reporting-engine, kenzey0man/reporting-engine, kevin070982/reporting-engine, khaeusler/reporting-engine, kittiu/reporting-engine, kmee/reporting-engine, kongrattapong/reporting-engine, kos94ok-3D/reporting-engine, krunal267/odoo-production, lachouettecoop/odoo-production, lbvisperas/reporting-engine, leemannd/reporting-engine, legalsylvain/reporting-engine, leonidasthe300/reporting-engine, libregob/reporting-engine, lideritjnma/reporting-engine, limingsichuan/reporting-engine, lintoct/reporting-engine, linuxnow/reporting-engine, loctv/patches, lubonbvba/reporting-engine, luc-demeyer/reporting-engine, lweiming/reporting-engine, maherjaballi/reporting-engine, max1314/reporting-engine, michaelgg84/reporting-engine, minhhq09/reporting-engine, mivilsoft/reporting-engine, mjavint/reporting-engine, modoolar/reporting-engine, mohamed-helmy/reporting-engine, mszinte/odoo-production, multidadosti-erp/reporting-engine, myceliandre/reporting-engine, myonnet/oca-reporting-engine, nabima/reporting-engine, nicolasjelincic/reporting-engine, ninetynineplus/reporting-engine, niulinlnc/reporting-engine, njeudy/reporting-engine, novawish/reporting-engine, nthnnl/odoo-production, nucleoosystem/reporting-engine, odof/reporting-engine, odoo-modules/odoo-production, odoofans/patches, odoogap/reporting-engine, odoonz/reporting-engine, omalbastin/patches, one2pret/reporting-engine, onesteinbv/reporting-engine, onurugur/reporting-engine, oondeo/reporting-engine, open-synergy/reporting-engine, osiell/reporting-engine, ovnicraft/reporting-engine, p-tombez/reporting-engine, pasgou/reporting-engine, paulvermeulen/reporting-engine, piensom/reporting-engine, pnajman-modoolar/reporting-engine, popcomputadores-desenv/reporting-engine, praxigento/oca-reporting-engine, ps-tubtim/reporting-engine, pscloud/reporting-engine, puchisco/reporting-engine, pythoner-3k/reporting-engine, rachmataditiya/reporting-engine, richard-willdooit/reporting-engine, robertsvx27/reporting-engine, robin5210/reporting-engine, rossasa/reporting-engine, royalline1/patches, royalline1/reporting-engine-1, rrgaona/reporting-engine, rsullivan2704/reporting-engine, ruben-tonetto/reporting-engine, rwsdigital/reporting-engine, sacodoo/reporting-engine, sacostaylara/reporting-engine, saif-serpentcs/reporting-engine, samnimri/reporting-engine, sandreanybox/reporting-engine, sansirit/reporting-engine, sanube/reporting-engine, schout-it/reporting-engine, sekhsokh/reporting-engine, sendalpegat/reporting-engine, sergiocorato/reporting-engine, serpentcs-dev1/reporting-engine, sewisoft/reporting-engine, sgheller/reporting-engine, shiftctrl-io/reporting-engine, siddharth7815/odoo-production, simahawk/reporting-engine, soeethiha/reporting-engine, solvosci/reporting-engine, somiderventa/reporting-engine, songpon/reporting-engine, steingabelgaard/reporting-engine, sunflowerit/reporting-engine, suningwz/odoo-production, supercoopbdx/odoo-production, superkaja/reporting-engine, suwatuanp/reporting-engine, syci/reporting-engine, takinobori/oca-reporting-engine, tbaden/reporting-engine, tegin/reporting-engine, thandokazi/reporting-engine, thomaspot/reporting-engine, tirma-sa/reporting-engine, trobz/odoo-production, trobz/reporting-engine, tsengel2/reporting-engine, tuanna7593/reporting-engine, unitek-solusi/OCA-reporting-engine, ursais/reporting-engine, valmarnet/reporting-engine, vdedyukhin/reporting-engine, versada/reporting-engine, vidtsin/odoo-production, vidtsin/patches, vikichavada/reporting-engine, wahello/reporting-engine, wuhuizhong/reporting-engine, xcgd/reporting-engine, xhair/reporting-engine, xwh123807/reporting-engine, yelizariev/reporting-engine, ygdmxy/reporting-engine, zarumaru/reporting-engine, zeroincombenze/reporting-engine, zhaohuaw/reporting-engine, and zohaibrehman/reporting-engine

<h1 class="title">BI SQL Editor</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/13.0/bi_sql_editor"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-13-0/reporting-engine-13-0-bi_sql_editor"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>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)</p> <p>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.</p> <p>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).</p> <p>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.</p> <a name="warning"></a> <h2>Warning</h2> <p>This module is intended for technician people in a company and for Odoo integrators.</p> <p>It requires the user to know SQL syntax and Odoo models.</p> <p>If you don't have such skills, do not try to use this module specially on a production environment.</p> <a name="use-cases"></a> <h2>Use Cases</h2> <p>this module is interesting for the following use cases</p> <ul class="simple"> <li>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</li> <li>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</li> <li>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</li> </ul> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#installation" id="id1">Installation</a></li> <li><a class="reference internal" href="#configuration" id="id2">Configuration</a></li> <li><a class="reference internal" href="#usage" id="id3">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id5">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id6">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li> <li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li> </ul> </li> </ul> </div> <a name="installation"></a> <h3><a class="toc-backref" href="#id1">Installation</a></h3> <ul class="simple"> <li>You must put this module as <cite>server_wide_modules</cite> in your odoo configuration file or add '--load=bi_sql_editor' if you start odoo in command line.</li> </ul> <a name="configuration"></a> <h3><a class="toc-backref" href="#id2">Configuration</a></h3> <p>To configure this module, you need to:</p> <ul> <li><p class="first">Go to Settings / Technical / Database Structure / SQL Views</p> </li> <li><p class="first">tip your SQL request</p> <div class="figure"> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/01_sql_request.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/01_sql_request.png" style="width: 800px;" /> </div> </li> <li><p class="first">Select the group(s) that could have access to the view</p> <div class="figure"> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/02_security_access.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/02_security_access.png" style="width: 800px;" /> </div> </li> <li><p class="first">Click on the button 'Clean and Check Request'</p> </li> <li><p class="first">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.</p> <div class="figure"> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/03_field_mapping.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/03_field_mapping.png" style="width: 800px;" /> </div> </li> <li><p class="first">Click on the button 'Create SQL View, Indexes and Models'. (this step could take a while, if view is materialized)</p> </li> <li><p class="first">If it's a MATERIALIZED view:</p> <blockquote> <ul class="simple"> <li>a cron task is created to refresh the view. You can so define the frequency of the refresh.</li> <li>the size of view (and the indexes is displayed)</li> </ul> </blockquote> <div class="figure"> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/04_materialized_view_setting.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/04_materialized_view_setting.png" style="width: 800px;" /> </div> </li> <li><p class="first">Finally, click on 'Create UI', to create new menu, action, graph view and search view.</p> </li> </ul> <a name="usage"></a> <h3><a class="toc-backref" href="#id3">Usage</a></h3> <p>To use this module, you need to:</p> <ol class="arabic simple"> <li>Go to 'Reporting' / 'Custom Reports'</li> <li>Select the desired report</li> </ol> <blockquote> <div class="figure"> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/05_reporting_pivot.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/05_reporting_pivot.png" style="width: 800px;" /> </div> </blockquote> <ul> <li><p class="first">You can switch to 'Pie' chart or 'Line Chart' as any report,</p> <div class="figure"> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/05_reporting_pie.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/13.0/bi_sql_editor/static/description/05_reporting_pie.png" style="width: 800px;" /> </div> </li> </ul> <a name="bug-tracker"></a> <h3><a class="toc-backref" href="#id4">Bug Tracker</a></h3> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>. 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 <a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20bi_sql_editor%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h3><a class="toc-backref" href="#id5">Credits</a></h3> <a name="authors"></a> <h4><a class="toc-backref" href="#id6">Authors</a></h4> <ul class="simple"> <li>GRAP</li> </ul> <a name="contributors"></a> <h4><a class="toc-backref" href="#id7">Contributors</a></h4> <ul class="simple"> <li>Sylvain LE GAL (<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>)</li> <li><dl class="first docutils"> <dt>This module is highly inspired by the work of</dt> <dd><ul class="first last"> <li>Onestein: (<a class="reference external" href="http://www.onestein.nl/">http://www.onestein.nl/</a>) Module: OCA/server-tools/bi_view_editor. Link: <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/9.0/bi_view_editor">https://github.com/OCA/reporting-engine/tree/9.0/bi_view_editor</a></li> <li>Anybox: (<a class="reference external" href="https://anybox.fr/">https://anybox.fr/</a>) Module : OCA/server-tools/materialized_sql_view link: <a class="reference external" href="https://github.com/OCA/server-tools/pull/110">https://github.com/OCA/server-tools/pull/110</a></li> <li>GRAP, Groupement Régional Alimentaire de Proximité: (<a class="reference external" href="http://www.grap.coop/">http://www.grap.coop/</a>) Module: grap/odoo-addons-misc/pos_sale_reporting link: <a class="reference external" href="https://github.com/grap/odoo-addons-misc/tree/7.0/pos_sale_reporting">https://github.com/grap/odoo-addons-misc/tree/7.0/pos_sale_reporting</a></li> </ul> </dd> </dl> </li> </ul> <a name="maintainers"></a> <h4><a class="toc-backref" href="#id8">Maintainers</a></h4> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>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.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/13.0/bi_sql_editor">OCA/reporting-engine</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>