v 11.0 v 12.0 Third Party 23
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 911
Technical Name pentaho_reports
LicenseOPL-1
Websitehttps://www.willdooit.com
Versions 14.0 13.0 12.0 11.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 911
Technical Name pentaho_reports
LicenseOPL-1
Websitehttps://www.willdooit.com
Versions 14.0 13.0 12.0 11.0

Pentaho Reports for Odoo

WilldooIT Pentaho Reports Connector

This app allows reports which have been created using the Pentaho Report Designer to be executed from within Odoo. Pentaho reports can be added to report actions, or can be attached to menu items.

Reports which prompt for parameters will dynamically render a wizard allowing users to specify values for the report.

Additional modules allow the reports to be executed via the Odoo cron process, with stored sets of parameters. Those parameters can use formulae to default meaningful values.

WilldooIT is Australia's first Odoo Gold Partner and most experienced and awarded Odoo partner in the region.

Our in-house team works with businesses across a vast array of industries to provide the analytic, project management and technical skills to ensure your Odoo implementation delivers exceptional value to your business and provides a firm platform for growth.

Before you Purchase

This module is not suitable for installation on Odoo.sh, as there is a need to install and run a java component on the server.

The Odoo side is distributed in 4 modules. This module is the core of the Pentaho reports connector. It is the module that provides communication between Odoo and Pentaho, and is the module which builds dynamic wizards to prompt for report variables.

In this Package

Create Report in Pentaho Report Designer

First, a java container, like Tomcat, needs to be installed, and the downloadable war file needs to be deployed in to it. Odoo needs to be configured to know where this is running.

Create Report in Pentaho Report Designer

Create reports using the Pentaho Report Designer (not included, but freely available on the web).

Create Report Action in Odoo

Upload the report definition (prpt file) to create a standard Odoo Report action, with a new Report Type. The Output Format is Configurable. The report can be added to the print menu. Alternatively, the report can be added as a menu item.

Execute from Print Action

Execute the report, potentially using selected records to drive output.

Create and Upload a Report with Prompted Parameters

Create a report definition with variable parameters. Upload the report definition (prpt file) to create a standard Odoo Report action. A report with parameters should be added as a menu item.

Execute from Menu, Providing Prompted Values

Execute the report. The module automatically creates a wizard to allow variable parameters to be selected or keyed.

Alternate Packages Available

  • Pentaho Reports (+ Selections Saving) is a bundle which includes THIS core module, and pentaho_report_selection_sets "Pentaho Report Selections Saving" add on. That allows parameters to be stored and recalled. There are a number of formulae that can augment the parameter recall functionality in order to provide clever and dynamic default values.
  • Pentaho Reports (+ Scheduler) is a bundle which includes THIS core module, and pentaho_report_scheduler "Pentaho Report Scheduler" add on. That allows reports to be scheduled in an Odoo cron process, with the results being sent to any number of contacts.
  • Pentaho Reports (Complete Package) is a bundle which includes THIS core module, and both of the above modules, as well as a bridging module allowing the 3 to work together.

Pentaho Reports for Odoo - Core

Instructions

Report Designer and Java Component

Our most recent successful implementations are using Pentaho 8.3.

Report designer version 5.0 and higher includes the Odoo datasource. It can be installed and used without the need for additional components.

Be aware, though, as discussed below and elsewhere, we are not supporting the Odoo datasource through the connector, at this point. So if you are planning to use the connector to load reports, then use SQL queries right now.

We have a pre-built war file with the java component, ready to be deployed in Tomcat. It can be downloaded from <https://willdooit.com/page/pentaho-reports-for-odoo-war/>.

Our testing has been done using:

  • Apache Tomcat 9.0.21
  • openjdk version "11.0.1" 2018-10-16

The java component can be built, if you desire, using instructions and code in our public repository at <https://github.com/WilldooIT/Pentaho-Odoo/>.

Issues can be reported on that repository, too.

Report Types

Broadly speaking, two types of data sources can be used to produce the reports. Odoo object data sources or SQL query data sources. Object Data Sources are currently not supported.

  • Object data sources have the advantage that they can use Odoo model columns, even those that are not stored in the database. This includes functional fields, related fields, properties. They can iterate through one2many and many2many subfields. They also respect Odoo record rules.
  • SQL data sources have the advantage that they allow greater flexibility in selections, and other SQL features like grouping and selective inclusion of sub-queries. They also allow selection where no Odoo model relationship exists. They do not respect Odoo record rules, which may be seen as an advantage for creating summary type reports which might be run by users who are unable to view low-level data. Because of this, you need to be careful.

Report Parameters

Prompted and hidden parameters are supported, as are mandatory values.

A number of reserved parameters are automatically passed, but the report needs to define these parameters in order to receive and use them. Reserved parameters currently passed are:

  • ids: the context ids when the report action is called.
  • user_id: the id of the user running the report.
  • user_name: the display name of the user running the report.
  • context_lang: the language in effect when the report action is executed.
  • context_tz: the timezone in effect when the report action is executed.

This list of reserved parameters is available for use regardless of data source, even reports which return possible parameter selections. They allow meaningful selections for other parameters.

Most Pentaho report parameter types and features have been mapped, where practical, to something which makes sense to an Odoo environment. This means that a number of Java data types don't necessarily differentiate. For example, (Integer / Long / Short / BigInteger / et al) are all treated as integers.

Default values can be passed for the parameters, and many default value formulae work.

Hidden parameters must obviously receive and work with a default value of some sort. This default can be the Pentaho default, or can be sent to the report in the context in the format:

{'pentaho_defaults': { .... }}

where the passed dictionary contains the parameter names as keys. See below for guidance on where to set this up.

Pentaho Display Types have been consolidated. Drop Down, Single Value List, etc, all display as Odoo selection pull downs. Some Pentaho multi value selection types, such as Check Box, etc, are implemented as single value selection pull downs. Date Picker uses the standard Odoo date/time widget. Pentaho multi value lists are implemented as many2manytag widgets, and support integer, string, and float data types.

Other Pentaho parameter features should be considered unsupported, such as Post-Processing Formula, Display Value Formula, Visible Items, Validate Values, et al.

Setup

Required parameters can be modified in Settings / Technical / Parameters / System Parameters.

The address of the Pentaho server which is used to render the report is defined with the parameter:

pentaho.server.url

For object based data sources, the Pentaho server will use XML-RPC to connect to the current database using the interface and port as defined in the Odoo config file, and the reporting user's credentials.

If not defined in the config file, the interface and port can be defined with the parameters:

  • pentaho.odoo.http.interface
  • pentaho.odoo.http.port

For SQL query based data sources, the Pentaho server will use the following parameters:

  • pentaho.postgres.host
  • pentaho.postgres.port
  • pentaho.postgres.login
  • pentaho.postgres.password

Report Actions

Reports are defined to Odoo under Settings / Technical / Actions / Reports. This is the place where standard Odoo report actions are defined.

Reports can be handled by Odoo in two ways. They can be linked to a menu, or they can be linked to a model.

  • Model linked reports will appear in the print menu, as per standard reports, or they can be specifically called with an action, such as a button. A record or number of records needs to be selected before the action will be invoked, and the ids of the selected records will be passed to the report as a list parameter called "ids". A report invoked this way will not prompt for any additional parameters. A front end custom wizard can be created, if desired, to invoke the action, but that wizard and the report would be very closely tied and need to be developed in conjunction with one other. To add a report to the print menu, use the Odoo smart button "Add in the 'Print' menu".
  • Menu linked reports will appear somewhere in a menu. They will pop up a window prompting for a report output type, and any additional (visible) parameters that are defined. Object ids passed to these reports are not meaningful, as no object or ids are guaranteed to be in effect when the action is called, so selection of data should be based on other parameters. Other reserved parameters, such as user id, may be meaningful in the context of prompting for parameters or ultimate data selection.

Report actions can override existing Odoo actions (such as invoice prints) or can be new actions.

The Template Name is only important if it is overriding an existing service, or if the report is to be invoked from coded actions like buttons or wizards. For menu linked actions or generic object linked actions, the service name is incidental.

Output types specified here are defaults, and can be overridden by either a custom wizard or by menu linked reports. They will not be changeable for model linked reports which don't have specific coding.

The prpt (Pentaho report definition) file selected is stored in the database. Changing the report using the designer will require the report to be re-loaded.

A prpt file and action can easily be defined as part of a module and distributed this way. Be aware, though, if the module is upgraded from within Odoo it could potentially reload the distributed report and may lose changes that were uploaded manually after module installation.

Security groups entered against the action will be respected in regard to action visibility - they play no role in the report execution.

If a context value is required to set a default value, it needs to be set against the created action. It is modifiable under Settings / Technical / Window Actions. It will already have a Context Value with the service_name defined, which should be left intact.

Disclaimer

Basic support can be directed to:

apps.support@willdooit.com

These modules have been developed over time to meet specific requirements as we have needed to meet them. If you have a feature request, please do let us know at:

richard.demeester@willdooit.com

Git issues can be still logged at our public repository at:

<https://github.com/WilldooIT/Pentaho-Odoo/issues>.
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
There are no ratings yet!
ldap integration
by
José Fernandez Pelaz
on 9/12/19, 4:04 PM

Is the module compatible with an odoo setup configured LDAP?

Re: ldap integration
by
Richard
on 10/13/19, 6:15 PM Author

Hi, José, I believe it should be, in it's current iteration. Since the call to Pentaho is self contained, and Pentaho will only call PostgreSQL, then I don't foresee any issues. It is untested with ldap, though. If we were supporting object based reporting, I would have said no. If you purchase and find an issue, we will attempt to solve it, or refund if we discover it is not fit for purpose. Richard