Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] bi_view_editor #960

Open
wants to merge 45 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1bf32f6
Initial commit bi_view_editor V9
astirpe Mar 6, 2017
4a8b6be
[MIG+IMP] bi_view_editor: Migration to v10 + enhancements
astirpe Mar 6, 2017
391315d
OCA Transbot updated translations from Transifex
oca-transbot Jan 27, 2018
aaed8fc
[MIG] bi_view_editor: Migration to 11.0
tarteo Mar 22, 2018
ba76d49
[FIX] bi_view_editor: Apostrophe + migration script
SimoRubi Aug 14, 2018
f4800cf
Remove logger warnings during update all
astirpe Aug 29, 2018
95bcdbe
[FIX] Field widget, new readme + Make enabled in list view default true
tarteo Sep 4, 2018
988dea8
Drop bi views when uninstalling module
astirpe Sep 7, 2018
f3ae3e1
[UPD] README.rst
OCA-git-bot Nov 27, 2018
29a2f1f
[UPD] Update bi_view_editor.pot
oca-travis Nov 27, 2018
ad8cac7
[12.0][MIG] bi_view_editor
astirpe Jun 6, 2019
f97ab1e
Add extra functionalities
astirpe Jun 18, 2019
a583ebb
[UPD] Update bi_view_editor.pot
oca-travis Nov 29, 2019
58e4a42
[UPD] README.rst
OCA-git-bot Nov 29, 2019
486857b
Update translation files
oca-transbot Jan 9, 2020
57f71b0
bi_view_editor: window functions without ORDER BY clause do not have …
SimoRubi Apr 23, 2020
b369c32
bi_view_editor: Better error message if the query is not correct
SimoRubi May 7, 2020
4f76c39
pre-commit
astirpe Sep 9, 2020
2c31b02
[13.0][MIG] bi_view_editor
astirpe Sep 9, 2020
ca6299a
[14.0][MIG] bi_view_editor
astirpe Oct 20, 2020
4991510
[UPD] Update bi_view_editor.pot
oca-travis Apr 21, 2021
3301a1b
[UPD] README.rst
OCA-git-bot Apr 21, 2021
737a7e9
bi_view_editor: add deb external dependencies
sbidoul Feb 21, 2022
bf7de97
Translated using Weblate (Italian)
francesco-ooops Jul 6, 2022
5120fad
[MIG] bi_view_editor: Migration to 15.0
Mar 8, 2023
63323f7
[UPD] Update bi_view_editor.pot
Mar 9, 2023
7365c5f
[UPD] README.rst
OCA-git-bot Mar 9, 2023
fb8d696
[MIG] bi_view_editor: migration to 16.0
huguesdk Oct 25, 2023
0bbfc66
[UPD] Update bi_view_editor.pot
Nov 7, 2023
682d576
[BOT] post-merge updates
OCA-git-bot Nov 7, 2023
c8a1ccd
Update translation files
weblate Nov 7, 2023
6ded4af
[IMP] bi_view_editor: Restrict access to BI View Editor Managers
yankinmax Oct 19, 2023
066ab47
[UPD] Update bi_view_editor.pot
Nov 7, 2023
cb167e5
[BOT] post-merge updates
OCA-git-bot Nov 7, 2023
d6a11ed
Update translation files
weblate Nov 7, 2023
db2a98d
Translated using Weblate (Spanish)
Ivorra78 Nov 7, 2023
2e1d0ae
Translated using Weblate (Italian)
mymage Nov 9, 2023
dd24c0b
Translated using Weblate (Japanese)
liuhehe1995 Jan 12, 2024
81aa9a6
Translated using Weblate (Italian)
mymage Jan 18, 2024
34057cd
[UPD] Update bi_view_editor.pot
Apr 22, 2024
dc8e6c6
Update translation files
weblate Apr 22, 2024
11b08bb
Translated using Weblate (Italian)
mymage Apr 29, 2024
a23dc90
Translated using Weblate (Swedish)
jakobkrabbe Jun 27, 2024
4c00443
[IMP] bi_view_editor: pre-commit auto fixes
cormaza Jan 6, 2025
11deda8
[MIG] bi_view_editor: Migration to 18.0
cormaza Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions bi_view_editor/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
==============
BI View Editor
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2aebf98b5895f5e5ea64169daba7a945b934e2a9006b35cd20e496cee34287d1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/18.0/bi_view_editor
:alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-bi_view_editor
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

BI View Editor is a tool integrated in Odoo that allows users define and
execute their own reports without the need to code.

Purpose:

- The BI View Editor is used to create reports not already contained in
the standard Odoo, combining data from existing sources.
- It has been designed to be used by users with little or no knowledge
of the technical architecture of Odoo. Users visually link business
objects and select the fields to visualize.
- The BI View Editor offers users different types of representations,
including tree, graph, pivot views.

**Table of contents**

.. contents::
:local:

Installation
============

In the Odoo configuration file add ``bi_view_editor`` in the list
``server_wide_modules``:

.. code:: ini

[options]
(...)
server_wide_modules = web,bi_view_editor
(...)

Alternatively specify ``--load=bi_view_editor`` when starting Odoo by
command line.

Optionally it is possible to enable the view of the ER Diagram. For this
you need to install Graphviz, an open source graph visualization
software:

.. code:: bash

``sudo apt-get install graphviz``

Usage
=====

To graphically design your analysis data-set:

- From the Dashboards menu, select "Custom BI Views"
- BI Views creation is restricted to members of "BI View Editor Manager"
group. You can add this group to a user in User form, Access Rights,
Technical section.
- Browse trough the business objects in the "Query Builder" tab
- Pick the interesting fields (Drag & Drop)
- For each selected field, right-click on the Options column and select
whether it's a row, column or measure; if you want to remove the field
from the list view, unflag the checkbox ´List´ in the Options column
- Save and click "Generate BI View"
- Click "Open BI View" to view the result

To access the created BI View with a dedicated menu:

- If module Dashboard (board) is installed, the standard "Add to My
Dashboard" functionality would be available
- "Create a menu" is restricted to members of "BI View Editor Manager"
group.
- Click "Create a menu" to create a new menu item directly linked to
your new BI view (this feature is available in developer mode); when
the BI view is reset back to draft this menu will be removed, and you
will need to re-create the menu entry.

A more advanced UI is also available under the "Details" tab. It
provides extra possibilities for more advanced users, like to use LEFT
JOIN instead of the default INNER JOIN.

It also possible to improve the IDs generation for new views by adding
an Over Condition in the "SQL" tab, see
https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS
for further details. For instance, an ORDER BY clause helps preventing
unreliable behavior when filtering the generated views.

Known issues / Roadmap
======================

- Non-stored fields and many2many fields are not supported.
- Provide a tutorial (eg. a working example of usage).
- Find better ways to extend the *\_auto_init()* without override.
- Possibly avoid the monkey patches.
- Data the user has no access to (e.g. in a multi company situation) can
be viewed by making a view. Would be nice if models available to
select when creating a view are limited to the ones that have
intersecting groups.
- As of Odoo 16, translations of the name of a BI View and of the field
descriptions do not work as expected: the translated strings are
selected (by the user's language) when the view is generated (and
stored as their ``en_US`` value) instead of when it is displayed.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/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 <https://github.com/OCA/reporting-engine/issues/new?body=module:%20bi_view_editor%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Onestein

Contributors
------------

- Simon Janssens <s.janssens@onestein.nl>
- Diego Luis Neto <diegoluis.neto@gmail.com>
- Dennis Sluijk <d.sluijk@onestein.nl>
- Kevin Graveman <k.graveman@onestein.nl>
- Richard Dijkstra <r.dijkstra@onestein.nl>
- Andrea Stirpe <a.stirpe@onestein.nl>
- Antonio Esposito <a.esposito@onestein.nl>
- Jordi Ballester Alomar <jordi.ballester@eficent.com>
- Italo LOPES <italo.lopes@camptocamp.com>
- `Coop IT Easy SC <https://coopiteasy.be>`__:

- hugues de keyzer

Other credits
-------------

Funders
~~~~~~~

The development of this module for Odoo 11.0 has been financially
supported by:

- IDEAL Connaissances SAS https://www.idealconnaissances.com

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/18.0/bi_view_editor>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions bi_view_editor/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import wizard
from .hooks import uninstall_hook
31 changes: 31 additions & 0 deletions bi_view_editor/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2015-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "BI View Editor",
"summary": "Graphical BI views builder for Odoo",
"images": ["static/description/main_screenshot.png"],
"author": "Onestein,Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/reporting-engine",
"category": "Productivity",
"version": "18.0.1.1.0",
"development_status": "Beta",
"depends": [
"spreadsheet_dashboard",
"web",
],
"external_dependencies": {"deb": ["graphviz"], "python": ["pydot"]},
"data": [
"security/res_groups.xml",
"security/ir.model.access.csv",
"security/rules.xml",
"views/bve_view.xml",
],
"assets": {
"web.assets_backend": [
"bi_view_editor/static/src/components/**/*",
],
},
"uninstall_hook": "uninstall_hook",
}
28 changes: 28 additions & 0 deletions bi_view_editor/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2015-2019 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


def uninstall_hook(cr, registry):
# delete dirty data that could cause problems
# while re-installing the module
cr.execute(
"""
delete from ir_model where model like 'x_bve.%'
"""
)
cr.execute(
"""
delete from bve_view where model_name like 'x_bve.%'
"""
)
cr.execute(
"""
SELECT 'DROP VIEW ' || table_name
FROM information_schema.views
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
AND table_name like 'x_bve_%'
"""
)
results = list(cr.fetchall())
for result in results:
cr.execute(result[0])

Check warning on line 28 in bi_view_editor/hooks.py

View check run for this annotation

Codecov / codecov/patch

bi_view_editor/hooks.py#L28

Added line #L28 was not covered by tests
Loading
Loading