diff --git a/bi_view_editor/README.rst b/bi_view_editor/README.rst index ba2a50f4..638eda48 100644 --- a/bi_view_editor/README.rst +++ b/bi_view_editor/README.rst @@ -1,11 +1,30 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - ============== BI View Editor ============== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/11.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-11-0/reporting-engine-11-0-bi_view_editor + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/143/11.0 + :alt: Try me on Runbot + +|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. @@ -21,11 +40,14 @@ Purpose: * The BI View Editor offers users different types of representations, including tree, graph, pivot views. +**Table of contents** + +.. contents:: + :local: Usage ===== - To graphically design your analysis data-set: - From the Dashboards menu, select "Custom BI Views" @@ -37,10 +59,6 @@ To graphically design your analysis data-set: - If module Dashboard (board) is installed, the standard "Add to My Dashboard" functionality would be available - 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. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/143/11.0 - Known issues / Roadmap ====================== @@ -58,21 +76,23 @@ Known issues / Roadmap 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 smash it by providing detailed and welcomed feedback. +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Onestein Contributors ------------- +~~~~~~~~~~~~ * Simon Janssens * Diego Luis Neto @@ -83,7 +103,13 @@ Contributors * Antonio Esposito * Jordi Ballester Alomar -Do not contact contributors directly about support or help with technical issues. +Other credits +~~~~~~~~~~~~~ + +Images +------ + +* Odoo Community Association: `Icon `_. Funders ------- @@ -92,17 +118,19 @@ The development of this module has been financially supported by: * IDEAL Connaissances SAS https://www.idealconnaissances.com -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit https://odoo-community.org. +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. diff --git a/bi_view_editor/readme/CONTRIBUTORS.rst b/bi_view_editor/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..14cc58d6 --- /dev/null +++ b/bi_view_editor/readme/CONTRIBUTORS.rst @@ -0,0 +1,8 @@ +* Simon Janssens +* Diego Luis Neto +* Dennis Sluijk +* Kevin Graveman +* Richard Dijkstra +* Andrea Stirpe +* Antonio Esposito +* Jordi Ballester Alomar diff --git a/bi_view_editor/readme/CREDITS.rst b/bi_view_editor/readme/CREDITS.rst new file mode 100644 index 00000000..d4f0eafe --- /dev/null +++ b/bi_view_editor/readme/CREDITS.rst @@ -0,0 +1,11 @@ +Images +------ + +* Odoo Community Association: `Icon `_. + +Funders +------- + +The development of this module has been financially supported by: + +* IDEAL Connaissances SAS https://www.idealconnaissances.com diff --git a/bi_view_editor/readme/DESCRIPTION.rst b/bi_view_editor/readme/DESCRIPTION.rst new file mode 100644 index 00000000..f3f712b0 --- /dev/null +++ b/bi_view_editor/readme/DESCRIPTION.rst @@ -0,0 +1,14 @@ +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. diff --git a/bi_view_editor/readme/ROADMAP.rst b/bi_view_editor/readme/ROADMAP.rst new file mode 100644 index 00000000..4d261c61 --- /dev/null +++ b/bi_view_editor/readme/ROADMAP.rst @@ -0,0 +1,10 @@ +* Non-stored fields and many2many fields are not supported +* Provide graph view for table relations +* Extend the capabilities of the tree views (e.g. add sums) +* Provide a tutorial (eg. a working example of usage) +* Implement a more advanced UI, with possibilities to use LEFT JOIN as default instead of INNER JOIN +* 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 +* Store the JSON data structure in ORM +* Would be nice if models available to select when creating a view are limited to the ones that have intersecting groups (for non technical users) diff --git a/bi_view_editor/readme/USAGE.rst b/bi_view_editor/readme/USAGE.rst new file mode 100644 index 00000000..a91ccbdd --- /dev/null +++ b/bi_view_editor/readme/USAGE.rst @@ -0,0 +1,10 @@ +To graphically design your analysis data-set: + +- From the Dashboards menu, select "Custom BI Views" +- Browse trough the business objects in the Query 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 +- If module Dashboard (board) is installed, the standard "Add to My Dashboard" functionality would be available +- 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. diff --git a/bi_view_editor/static/src/js/bi_view_editor.FieldList.js b/bi_view_editor/static/src/js/bi_view_editor.FieldList.js index 37cbc2e1..93782789 100644 --- a/bi_view_editor/static/src/js/bi_view_editor.FieldList.js +++ b/bi_view_editor/static/src/js/bi_view_editor.FieldList.js @@ -132,7 +132,7 @@ odoo.define('bi_view_editor.FieldList', function(require) { field.row = typeof field.row === 'undefined' ? false : field.row; field.column = typeof field.column === 'undefined' ? false : field.column; field.measure = typeof field.measure === 'undefined' ? false : field.measure; - field.list = typeof field.list === 'undefined' ? false : field.list; + field.list = typeof field.list === 'undefined' ? true : field.list; field._id = typeof field._id === 'undefined' ? _.uniqueId('node_') : field._id; if(field.join_node) { field.join_left = typeof field.join_left === 'undefined' ? false : field.join_left; diff --git a/bi_view_editor/static/src/js/bi_view_editor.js b/bi_view_editor/static/src/js/bi_view_editor.js index 2f52d483..b9abe998 100644 --- a/bi_view_editor/static/src/js/bi_view_editor.js +++ b/bi_view_editor/static/src/js/bi_view_editor.js @@ -54,15 +54,16 @@ odoo.define('bi_view_editor', function (require) { if (this.mode !== 'readonly') { this.field_list.set([]); this.loadAndPopulateModelList(); - this._setValue(JSON.stringify(this.field_list.get())); + this._setValue(this.field_list.get()); } }, fieldListChanged: function() { - this._setValue(JSON.stringify(this.field_list.get())); + this._setValue(this.field_list.get()); }, fieldListRemoved: function() { + console.log(this.field_list.get()); this.loadAndPopulateModelList(); - this._setValue(JSON.stringify(this.field_list.get())); + this._setValue(this.field_list.get()); }, renderValue: function() { this.field_list.set(JSON.parse(this.value)); @@ -113,7 +114,7 @@ odoo.define('bi_view_editor', function (require) { this.field_list.add(field); this.loadAndPopulateModelList(); - this._setValue(JSON.stringify(this.field_list.get())); + this._setValue(this.field_list.get()); }, addField: function(field) { var data = _.extend({}, field); @@ -132,9 +133,12 @@ odoo.define('bi_view_editor', function (require) { data.table_alias = table_alias; this.field_list.add(data); this.loadAndPopulateModelList(); - this._setValue(JSON.stringify(this.field_list.get())); + this._setValue(this.field_list.get()); } }.bind(this)); + }, + _parseValue: function(value) { + return JSON.stringify(value); } });