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.

142 lines
6.0 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. ==========================================
  5. Py3o Report Engine - Fusion server support
  6. ==========================================
  7. 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:
  8. * much better performances (Libreoffice runs permanently in the background, no need to spawn a new Libreoffice instance upon every document conversion).
  9. * ability to configure PDF export options in Odoo. This brings many new possibilities such as the ability to generate:
  10. * PDF forms
  11. * PDF/A documents (required by some electronic invoicing standards such as `Factur-X <http://fnfe-mpe.org/factur-x/>`_)
  12. * watermarked PDF documents
  13. * password-protected PDF documents
  14. Installation
  15. ============
  16. Install several additional components and Python libs:
  17. * `Py3o Fusion server <https://bitbucket.org/faide/py3o.fusion>`_,
  18. * `Py3o render server <https://bitbucket.org/faide/py3o.renderserver>`_,
  19. * a Java Runtime Environment (JRE), which can be OpenJDK,
  20. * Libreoffice started in the background in headless mode,
  21. * the Java driver for Libreoffice (Juno).
  22. 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.
  23. The installation procedure below uses the Java driver. It has been successfully tested on Ubuntu 16.04 LTS ; if you use another OS, you may have to change a few details.
  24. Installation of Libreoffice, JRE and required Java libs on Debian/Ubuntu:
  25. .. code::
  26. sudo apt-get install default-jre ure libgoogle-gson-java libreoffice-java-common libreoffice-writer
  27. 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:
  28. .. code::
  29. sudo apt-get install fonts-symbola
  30. Installation of py3o.fusion:
  31. .. code::
  32. pip install py3o.fusion
  33. pip install service-identity
  34. Installation of py3o.renderserver:
  35. .. code::
  36. pip install py3o.renderserver
  37. At the end, with the dependencies, you should have the following py3o python libs:
  38. .. code::
  39. % pip freeze | grep py3o
  40. py3o.formats==0.3
  41. py3o.fusion==0.8.8
  42. py3o.renderclient==0.2
  43. py3o.renderers.juno==0.8
  44. py3o.renderserver==0.5.1
  45. py3o.template==0.9.12
  46. py3o.types==0.1.1
  47. Start the Py3o Fusion server:
  48. .. code::
  49. start-py3o-fusion --debug -s localhost
  50. Start the Py3o render server:
  51. .. code::
  52. start-py3o-renderserver --java=/usr/lib/jvm/default-java/jre/lib/amd64/server/libjvm.so --ure=/usr/share --office=/usr/lib/libreoffice --driver=juno --sofficeport=8997
  53. On the output of the Py3o render server, the first line looks like:
  54. .. code::
  55. DEBUG:root:Starting JVM: /usr/lib/jvm/default-java/jre/lib/amd64/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
  56. 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.
  57. To check that the Py3o Fusion server is running fine, visit the URL http://<IP_address>: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.*.
  58. 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:
  59. .. code::
  60. sudo apt-get install msttcorefonts
  61. Known issues / Roadmap
  62. ======================
  63. * Add support for PDF signatures (possible, but no easy because the signature certificate is a very particular PDF export option)
  64. Bug Tracker
  65. ===========
  66. Bugs are tracked on `GitHub Issues
  67. <https://github.com/OCA/reporting-engine/issues>`_. In case of trouble, please
  68. check there if your issue has already been reported. If you spotted it first,
  69. help us smashing it by providing a detailed and welcomed feedback.
  70. Credits
  71. =======
  72. Contributors
  73. ------------
  74. * Florent Aide (`XCG Consulting <http://odoo.consulting/>`_)
  75. * Laurent Mignon <laurent.mignon@acsone.eu>,
  76. * Alexis de Lattre <alexis.delattre@akretion.com>,
  77. * Guewen Baconnier <guewen.baconnier@camptocamp.com>
  78. * Omar Castiñeira <omar@comunitea.com>
  79. * Holger Brunn <hbrunn@therp.nl>
  80. Do not contact contributors directly about help with questions or problems concerning this addon, but use the `community mailing list <mailto:community@mail.odoo.com>`_ or the `appropriate specialized mailinglist <https://odoo-community.org/groups>`_ for help, and the bug tracker linked in `Bug Tracker`_ above for technical issues.
  81. Maintainer
  82. ----------
  83. .. image:: https://odoo-community.org/logo.png
  84. :alt: Odoo Community Association
  85. :target: https://odoo-community.org
  86. This module is maintained by the OCA.
  87. OCA, or the Odoo Community Association, is a nonprofit organization whose
  88. mission is to support the collaborative development of Odoo features and
  89. promote its widespread use.
  90. To contribute to this module, please visit https://odoo-community.org.