Skip to content

Commit 081e411

Browse files
committed
Initial commit bi_view_editor V9
[MIG+IMP] bi_view_editor: Migration to v10 + enhancements * Add menu items creation feature * Added selection of fields of a tree view * Improved usability and strings made translatable * Avoid display duplicated nodes * Robustness * Updated Dutch translation * Avoid possible sql injection in bi_view_editor * Removed deprecated RegistryManager OCA Transbot updated translations from Transifex [MIG] bi_view_editor: Migration to 11.0 [FIX] bi_view_editor: Apostrophe + migration script Apostrophe in model name raised ValueError. Added needed migration script. Remove logger warnings during update all [FIX] Field widget, new readme + Make enabled in list view default true Drop bi views when uninstalling module [UPD] README.rst [UPD] Update bi_view_editor.pot [12.0][MIG] bi_view_editor Add extra functionalities Add LEFT JOIN capabilities Add sums and avg capabilities for tree views Robustness and code review Provide ER diagram view for table relations [UPD] Update bi_view_editor.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: reporting-engine-12.0/reporting-engine-12.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-bi_view_editor/ bi_view_editor: window functions without ORDER BY clause do not have reliable behavior bi_view_editor: Better error message if the query is not correct pre-commit [13.0][MIG] bi_view_editor [14.0][MIG] bi_view_editor pre-commit [UPD] Update bi_view_editor.pot [UPD] README.rst bi_view_editor: add deb external dependencies Translated using Weblate (Italian) Currently translated at 18.6% (17 of 91 strings) Translation: reporting-engine-14.0/reporting-engine-14.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-bi_view_editor/it/ [IMP] bi_view_editor : black, isort, prettier [MIG] bi_view_editor: Migration to 15.0 [UPD] Update bi_view_editor.pot [UPD] README.rst [MIG] bi_view_editor: migration to 16.0 [UPD] Update bi_view_editor.pot [BOT] post-merge updates Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/ [IMP] bi_view_editor: Restrict access to BI View Editor Managers Forward-port changes from 15.0 OCA#801 [UPD] Update bi_view_editor.pot [BOT] post-merge updates Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/ Translated using Weblate (Spanish) Currently translated at 100.0% (91 of 91 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/es/ Translated using Weblate (Italian) Currently translated at 18.6% (17 of 91 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/it/ Translated using Weblate (Japanese) Currently translated at 53.8% (49 of 91 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/ja/ Translated using Weblate (Italian) Currently translated at 100.0% (91 of 91 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/it/ [UPD] Update bi_view_editor.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/ Translated using Weblate (Italian) Currently translated at 100.0% (92 of 92 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/it/ Translated using Weblate (Swedish) Currently translated at 100.0% (92 of 92 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-bi_view_editor Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-bi_view_editor/sv/ [IMP] bi_view_editor: pre-commit auto fixes [17.0][MIG] bi_view_editor: Migrate [17.0][MIG] bi_view_editor: Migrate
1 parent 0f794ce commit 081e411

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+43736
-0
lines changed

bi_view_editor/README.rst

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
==============
2+
BI View Editor
3+
==============
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:2aebf98b5895f5e5ea64169daba7a945b934e2a9006b35cd20e496cee34287d1
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
20+
:target: https://github.com/OCA/reporting-engine/tree/17.0/bi_view_editor
21+
:alt: OCA/reporting-engine
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-bi_view_editor
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
BI View Editor is a tool integrated in Odoo that allows users define and
32+
execute their own reports without the need to code.
33+
34+
Purpose:
35+
36+
- The BI View Editor is used to create reports not already contained in
37+
the standard Odoo, combining data from existing sources.
38+
- It has been designed to be used by users with little or no knowledge
39+
of the technical architecture of Odoo. Users visually link business
40+
objects and select the fields to visualize.
41+
- The BI View Editor offers users different types of representations,
42+
including tree, graph, pivot views.
43+
44+
**Table of contents**
45+
46+
.. contents::
47+
:local:
48+
49+
Installation
50+
============
51+
52+
In the Odoo configuration file add ``bi_view_editor`` in the list
53+
``server_wide_modules``:
54+
55+
.. code:: ini
56+
57+
[options]
58+
(...)
59+
server_wide_modules = web,bi_view_editor
60+
(...)
61+
62+
Alternatively specify ``--load=bi_view_editor`` when starting Odoo by
63+
command line.
64+
65+
Optionally it is possible to enable the view of the ER Diagram. For this
66+
you need to install Graphviz, an open source graph visualization
67+
software:
68+
69+
.. code:: bash
70+
71+
``sudo apt-get install graphviz``
72+
73+
Usage
74+
=====
75+
76+
To graphically design your analysis data-set:
77+
78+
- From the Dashboards menu, select "Custom BI Views"
79+
- BI Views creation is restricted to members of "BI View Editor Manager"
80+
group. You can add this group to a user in User form, Access Rights,
81+
Technical section.
82+
- Browse trough the business objects in the "Query Builder" tab
83+
- Pick the interesting fields (Drag & Drop)
84+
- For each selected field, right-click on the Options column and select
85+
whether it's a row, column or measure; if you want to remove the field
86+
from the list view, unflag the checkbox ´List´ in the Options column
87+
- Save and click "Generate BI View"
88+
- Click "Open BI View" to view the result
89+
90+
To access the created BI View with a dedicated menu:
91+
92+
- If module Dashboard (board) is installed, the standard "Add to My
93+
Dashboard" functionality would be available
94+
- "Create a menu" is restricted to members of "BI View Editor Manager"
95+
group.
96+
- Click "Create a menu" to create a new menu item directly linked to
97+
your new BI view (this feature is available in developer mode); when
98+
the BI view is reset back to draft this menu will be removed, and you
99+
will need to re-create the menu entry.
100+
101+
A more advanced UI is also available under the "Details" tab. It
102+
provides extra possibilities for more advanced users, like to use LEFT
103+
JOIN instead of the default INNER JOIN.
104+
105+
It also possible to improve the IDs generation for new views by adding
106+
an Over Condition in the "SQL" tab, see
107+
https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS
108+
for further details. For instance, an ORDER BY clause helps preventing
109+
unreliable behavior when filtering the generated views.
110+
111+
Known issues / Roadmap
112+
======================
113+
114+
- Non-stored fields and many2many fields are not supported.
115+
- Provide a tutorial (eg. a working example of usage).
116+
- Find better ways to extend the *\_auto_init()* without override.
117+
- Possibly avoid the monkey patches.
118+
- Data the user has no access to (e.g. in a multi company situation) can
119+
be viewed by making a view. Would be nice if models available to
120+
select when creating a view are limited to the ones that have
121+
intersecting groups.
122+
- As of Odoo 16, translations of the name of a BI View and of the field
123+
descriptions do not work as expected: the translated strings are
124+
selected (by the user's language) when the view is generated (and
125+
stored as their ``en_US`` value) instead of when it is displayed.
126+
127+
Bug Tracker
128+
===========
129+
130+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
131+
In case of trouble, please check there if your issue has already been reported.
132+
If you spotted it first, help us to smash it by providing a detailed and welcomed
133+
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20bi_view_editor%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
134+
135+
Do not contact contributors directly about support or help with technical issues.
136+
137+
Credits
138+
=======
139+
140+
Authors
141+
-------
142+
143+
* Onestein
144+
145+
Contributors
146+
------------
147+
148+
- Simon Janssens <[email protected]>
149+
- Diego Luis Neto <[email protected]>
150+
- Dennis Sluijk <[email protected]>
151+
- Kevin Graveman <[email protected]>
152+
- Richard Dijkstra <[email protected]>
153+
- Andrea Stirpe <[email protected]>
154+
- Antonio Esposito <[email protected]>
155+
- Jordi Ballester Alomar <[email protected]>
156+
- Italo LOPES <[email protected]>
157+
- `Coop IT Easy SC <https://coopiteasy.be>`__:
158+
159+
- hugues de keyzer
160+
161+
- `Binhex <https://binhex.cloud>`__:
162+
163+
- Antonio Ruban <[email protected]>
164+
165+
Other credits
166+
-------------
167+
168+
Funders
169+
~~~~~~~
170+
171+
The development of this module for Odoo 11.0 has been financially
172+
supported by:
173+
174+
- IDEAL Connaissances SAS https://www.idealconnaissances.com
175+
176+
Maintainers
177+
-----------
178+
179+
This module is maintained by the OCA.
180+
181+
.. image:: https://odoo-community.org/logo.png
182+
:alt: Odoo Community Association
183+
:target: https://odoo-community.org
184+
185+
OCA, or the Odoo Community Association, is a nonprofit organization whose
186+
mission is to support the collaborative development of Odoo features and
187+
promote its widespread use.
188+
189+
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/bi_view_editor>`_ project on GitHub.
190+
191+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

bi_view_editor/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models
4+
from . import wizard
5+
from .hooks import uninstall_hook

bi_view_editor/__manifest__.py

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2015-2020 Onestein (<https://www.onestein.eu>)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "BI View Editor",
6+
"summary": "Graphical BI views builder for Odoo",
7+
"images": ["static/description/main_screenshot.png"],
8+
"author": "Onestein,Odoo Community Association (OCA)",
9+
"license": "AGPL-3",
10+
"website": "https://github.com/OCA/reporting-engine",
11+
"category": "Productivity",
12+
"version": "17.0.1.1.0",
13+
"development_status": "Beta",
14+
"depends": ["web", "spreadsheet_dashboard"],
15+
"external_dependencies": {
16+
"deb": ["graphviz"],
17+
},
18+
"data": [
19+
"security/res_groups.xml",
20+
"security/ir.model.access.csv",
21+
"security/rules.xml",
22+
"views/bve_view.xml",
23+
],
24+
"assets": {
25+
"web.assets_backend": [
26+
"bi_view_editor/static/src/components/**/*",
27+
],
28+
},
29+
"uninstall_hook": "uninstall_hook",
30+
}

bi_view_editor/hooks.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2015-2019 Onestein (<https://www.onestein.eu>)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
5+
def uninstall_hook(cr, registry):
6+
# delete dirty data that could cause problems
7+
# while re-installing the module
8+
cr.execute(
9+
"""
10+
delete from ir_model where model like 'x_bve.%'
11+
"""
12+
)
13+
cr.execute(
14+
"""
15+
delete from bve_view where model_name like 'x_bve.%'
16+
"""
17+
)
18+
cr.execute(
19+
"""
20+
SELECT 'DROP VIEW ' || table_name
21+
FROM information_schema.views
22+
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
23+
AND table_name like 'x_bve_%'
24+
"""
25+
)
26+
results = list(cr.fetchall())
27+
for result in results:
28+
cr.execute(result[0])

0 commit comments

Comments
 (0)