OdooWiki OCA HUB

Py3o Report Engine - Fusion server support

report_py3o_fusion_server folder_open OCA/reporting-engine open_in_new
Reporting License: AGPL-3

This module was written to let a py3o fusion server handle format conversion instead of local libreoffice. If you install this module above the report_py3o module, you will have to deploy additionnal software components and run 3 daemons (libreoffice, py3o.fusion and py3o.renderserver). This additionnal complexiy comes with several advantages:

  • much better performances: Libreoffice runs permanently in the background, no need to spawn a new Libreoffice instance upon every document conversion.
  • ability to configure PDF export options in Odoo. This brings many new possibilities such as the ability to generate:
  • PDF forms
  • PDF/A documents (required by some electronic invoicing standards such as Factur-X)
  • watermarked PDF documents
  • password-protected PDF documents

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets Odoo send py3o reports to an external Fusion server for conversion instead of using local LibreOffice, and adds reusable PDF export option sets (PDF/A, watermarks, passwords, forms).

This module extends the py3o reporting engine so that document conversion can be delegated to a remote Fusion server rather than a local LibreOffice installation.

  • On each py3o report you can now choose a Fusion Server, mark it as "Local Fusion", and attach a set of PDF Options (the PDF Options field only appears for PDF reports).
  • A new "Py3o Servers" screen (under Reporting) lets you register server URLs, mark them active, and give each server default PDF Options.
  • A new "Py3o PDF Export Options" screen (under Reporting) lets you create named option sets controlling image compression and JPEG quality, image resolution, watermark text, PDF/A-1a archiving, tagged PDF, PDF forms and their submit format, bookmarks, initial view, zoom, window behaviour, links, encryption, passwords, printing and copying permissions.
  • Business rules are enforced: a py3o report cannot use remote fusion without a Fusion server; JPEG quality must be 1-100; the initial page must be positive; zoom must be 50-1600 when zoom magnification is used; PDF/A cannot be combined with opening cross-document links in a PDF reader, and enabling PDF/A clears PDF forms, encryption and permission restrictions.
  • When a report is generated, the template is sent to the server and the returned file is stored; PDF options defined on the report take priority over those on the server.

Only users in the Settings group can create or change servers and PDF options; other employees have read-only access.

Depends on

Required by other modules

Menus it adds

py3o_pdf_options_menupy3o_server_configuration_menu
Models and fields (4)
  • py3o.report · extends an existing model
  • py3o.server · new modelurl (Py3o Fusion Server URL), is_active (Active), pdf_options_id (PDF Options)
  • py3o.pdf.options · new modelname, pdfa (Archive PDF/A-1a (ISO 19005-1)), zoom (Zoom Factor), changes, encrypt, pdf_form (Create PDF Form), printing, watermark (Sign With Watermark), tagged_pdf (Tagged PDF (add document structure)), page_layout, hide_menubar, hide_toolbar, initial_page, initial_view (Panes), center_window (Center Window on Screen), magnification, watermark_text (WaterMark Text), export_comments, open_fullscreen (Open in Full Screen Mode), pdf_form_format (Submit Format), export_bookmarks, document_password, image_compression, image_jpeg_quality (Image JPEG Quality), export_placeholders, permission_password, export_hidden_slides (Export Automatically Insered Blank Pages), hide_window_controls (Hide Windows Controls), open_bookmark_levels (Visible Bookmark Levels), restrict_permissions
  • ir.actions.report · extends an existing modelpdf_options_id (PDF Options), py3o_server_id, py3o_is_local_fusion (Local Fusion)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 5 confirmed, 4 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/reporting-engine.

terminal Installation and usage

OCA documentation · Odoo 18.0

Install several additional components and Python libs:

  • Py3o Fusion server,
  • Py3o render server,
  • a Java Runtime Environment (JRE), which can be OpenJDK,
  • Libreoffice started in the background in headless mode,
  • the Java driver for Libreoffice (Juno).

It is also possible to use the Python driver for Libreoffice (PyUNO), but it is recommended to use the Java driver because it is more stable.

The installation procedure below uses the Java driver. It has been successfully tested on Ubuntu 18.04 LTS ; if you use another OS, you may have to change a few details.

Installation of Libreoffice, JRE and required Java libs on Debian/Ubuntu:

sudo apt-get install default-jre ure libgoogle-gson-java libreoffice-java-common libreoffice-writer

You may have to install additionnal fonts. For example, to have the special unicode symbols for phone/fax/email in the PDF reports generated by Py3o, you should install the following package:

sudo apt-get install fonts-symbola

Installation of py3o.fusion:

pip3 install py3o.fusion
pip3 install service-identity

Installation of py3o.renderserver:

pip3 install py3o.renderserver

At the end, with the dependencies, you should have the following py3o python libs:

% pip3 freeze | grep py3o
py3o.formats==0.3
py3o.fusion==0.8.9
py3o.renderclient==0.3
py3o.renderers.juno==0.8.1
py3o.renderserver==0.5.2
py3o.template==0.10.0
py3o.types==0.1.1

Start the Py3o Fusion server:

start-py3o-fusion --debug -s localhost -i localhost

Start the Py3o render server:

start-py3o-renderserver --java=/usr/lib/jvm/default-java/lib/server/libjvm.so --ure=/usr/share --office=/usr/lib/libreoffice --driver=juno --sofficeport=8997 -i localhost

On the output of the Py3o render server, the first line looks like:

DEBUG:root:Starting JVM: /usr/lib/jvm/default-java/lib/server/libjvm.so with options: -Djava.class.path=/usr/local/lib/python2.7/dist-packages/py3o/renderers/juno/py3oconverter.jar:/usr/share/java/juh.jar:/usr/share/java/jurt.jar:/usr/share/java/ridl.jar:/usr/share/java/unoloader.jar:/usr/share/java/java_uno.jar:/usr/lib/libreoffice/program/classes/unoil.jar -Xmx150M

After -Djava.class.path, there is a list of Java libs with .jar extension ; check that each JAR file is really present on your filesystem. If one of the jar files is present in another directory, create a symlink that points to the real location of the file. If all the jar files are present on another directory, adapt the --ure= argument on the command line of Py3o render server.

To check that the Py3o Fusion server is running fine, visit the URL \:8765/form. On this web page, under the section Target format, make sure that you have a line This server currently supports these formats: ods, odt, docx, doc, html, docbook, pdf, xls..

If you want to produce valid PDF/A documents with this module, activating the corresponding option in the PDF Export Options may not be enough, you also have to make sure that all the fonts used in the document template are installed on the Odoo server, so that they can be embedded in the PDF/A document. For example, if your document template uses the Arial font, you should install that font on your Odoo server:

sudo apt-get install msttcorefonts

To configure the PDF export options:

  • Go to the menu Settings \> Technical \> Reporting \> Py3o \> Py3o PDF Export Options and create a PDF export options profile.
  • Set the PDF export options profile on the Py3o Server (menu Settings \> Technical \> Reporting \> Py3o \> Py3o Servers) or on a particular Py3o report with PDF output format (menu Settings \> Technical \> Actions \> Reports).

No verified information in OCA: Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.