OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

188 lines
6.9 KiB

6 years ago
8 years ago
  1. =============
  2. BI SQL Editor
  3. =============
  4. .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  5. !! This file is generated by oca-gen-addon-readme !!
  6. !! changes will be overwritten. !!
  7. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8. .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
  9. :target: https://odoo-community.org/page/development-status
  10. :alt: Beta
  11. .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
  12. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  13. :alt: License: AGPL-3
  14. .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
  15. :target: https://github.com/OCA/reporting-engine/tree/12.0/bi_sql_editor
  16. :alt: OCA/reporting-engine
  17. .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
  18. :target: https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-bi_sql_editor
  19. :alt: Translate me on Weblate
  20. .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
  21. :target: https://runbot.odoo-community.org/runbot/143/12.0
  22. :alt: Try me on Runbot
  23. |badge1| |badge2| |badge3| |badge4| |badge5|
  24. This module extends the functionality of reporting, to support creation
  25. of extra custom reports.
  26. It allows user to write a custom SQL request. (Generally, admin users)
  27. Once written, a new model is generated, and user can map the selected field
  28. with odoo fields.
  29. Then user ends the process, creating new menu, action and graph view.
  30. Technically, the module create SQL View (or materialized view, if option is
  31. checked). Materialized view duplicates datas, but request are fastest. If
  32. materialized view is enabled, this module will create a cron task to refresh
  33. the data).
  34. By default, users member of 'SQL Request / User' can see all the views.
  35. You can specify extra groups that have the right to access to a specific view.
  36. Warning
  37. -------
  38. This module is intended for technician people in a company and for Odoo integrators.
  39. It requires the user to know SQL syntax and Odoo models.
  40. If you don't have such skills, do not try to use this module specially on a production
  41. environment.
  42. Use Cases
  43. ---------
  44. this module is interesting for the following use cases
  45. * You want to realize technical SQL requests, that Odoo framework doesn't allow
  46. (For exemple, UNION with many SELECT) A typical use case is if you want to have
  47. Sale Orders and PoS Orders datas in a same table
  48. * You want to customize an Odoo report, removing some useless fields and adding
  49. some custom ones. In that case, you can simply select the fields of the original
  50. report (sale.report model for exemple), and add your custom fields
  51. * You have a lot of data, and classical SQL Views have very bad performance.
  52. In that case, MATERIALIZED VIEW will be a good solution to reduce display duration
  53. **Table of contents**
  54. .. contents::
  55. :local:
  56. Installation
  57. ============
  58. * You must put this module as `server_wide_modules` in your odoo configuration file
  59. or add '--load=bi_sql_editor' if you start odoo in command line.
  60. Configuration
  61. =============
  62. To configure this module, you need to:
  63. * Go to Settings / Technical / Database Structure / SQL Views
  64. * tip your SQL request
  65. .. figure:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/01_sql_request.png
  66. :width: 800 px
  67. * Select the group(s) that could have access to the view
  68. .. figure:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/02_security_access.png
  69. :width: 800 px
  70. * Click on the button 'Clean and Check Request'
  71. * Once the sql request checked, the module analyses the column of the view,
  72. and propose field mapping. For each field, you can decide to create an index
  73. and set if it will be displayed on the pivot graph as a column, a row or a
  74. measure.
  75. .. figure:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/03_field_mapping.png
  76. :width: 800 px
  77. * Click on the button 'Create SQL View, Indexes and Models'. (this step could
  78. take a while, if view is materialized)
  79. * If it's a MATERIALIZED view:
  80. * a cron task is created to refresh
  81. the view. You can so define the frequency of the refresh.
  82. * the size of view (and the indexes is displayed)
  83. .. figure:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/04_materialized_view_setting.png
  84. :width: 800 px
  85. * Finally, click on 'Create UI', to create new menu, action, graph view and
  86. search view.
  87. Usage
  88. =====
  89. To use this module, you need to:
  90. #. Go to 'Reporting' / 'Custom Reports'
  91. #. Select the desired report
  92. .. figure:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/05_reporting_pivot.png
  93. :width: 800 px
  94. * You can switch to 'Pie' chart or 'Line Chart' as any report,
  95. .. figure:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/bi_sql_editor/static/description/05_reporting_pie.png
  96. :width: 800 px
  97. Bug Tracker
  98. ===========
  99. Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
  100. In case of trouble, please check there if your issue has already been reported.
  101. If you spotted it first, help us smashing it by providing a detailed and welcomed
  102. `feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20bi_sql_editor%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  103. Do not contact contributors directly about support or help with technical issues.
  104. Credits
  105. =======
  106. Authors
  107. ~~~~~~~
  108. * GRAP
  109. Contributors
  110. ~~~~~~~~~~~~
  111. * Sylvain LE GAL (https://twitter.com/legalsylvain)
  112. * This module is highly inspired by the work of
  113. * Onestein: (http://www.onestein.nl/)
  114. Module: OCA/server-tools/bi_view_editor.
  115. Link: https://github.com/OCA/reporting-engine/tree/9.0/bi_view_editor
  116. * Anybox: (https://anybox.fr/)
  117. Module : OCA/server-tools/materialized_sql_view
  118. link: https://github.com/OCA/server-tools/pull/110
  119. * GRAP, Groupement Régional Alimentaire de Proximité: (http://www.grap.coop/)
  120. Module: grap/odoo-addons-misc/pos_sale_reporting
  121. link: https://github.com/grap/odoo-addons-misc/tree/7.0/pos_sale_reporting
  122. Maintainers
  123. ~~~~~~~~~~~
  124. This module is maintained by the OCA.
  125. .. image:: https://odoo-community.org/logo.png
  126. :alt: Odoo Community Association
  127. :target: https://odoo-community.org
  128. OCA, or the Odoo Community Association, is a nonprofit organization whose
  129. mission is to support the collaborative development of Odoo features and
  130. promote its widespread use.
  131. This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/12.0/bi_sql_editor>`_ project on GitHub.
  132. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.