diff --git a/report_py3o/README.rst b/report_py3o/README.rst index 64718f82..141c33cd 100644 --- a/report_py3o/README.rst +++ b/report_py3o/README.rst @@ -65,17 +65,23 @@ Installation of Libreoffice and JRE on Debian/Ubuntu: sudo apt-get install default-jre ure 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: + +.. code:: + + sudo apt-get install fonts-symbola + At the end, with the dependencies, you should have the following py3o python libs: .. code:: % pip freeze | grep py3o py3o.formats==0.3 - py3o.fusion==0.8.6.dev1 + py3o.fusion==0.8.6 py3o.renderclient==0.2 - py3o.renderers.juno==0.7 - py3o.renderserver==0.5.1.dev1 - py3o.template==0.9.10.dev1 + py3o.renderers.juno==0.8 + py3o.renderserver==0.5.1 + py3o.template==0.9.11 py3o.types==0.1.1 Start the Py3o Fusion server: @@ -88,29 +94,15 @@ Start the Py3o render server: .. code:: - start-py3o-renderserver --java=/usr/lib/jvm/default-java/jre/lib/amd64/server/libjvm.so --ure=/usr/lib --office=/usr/lib/libreoffice --driver=juno --sofficeport=8997 + 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 On the output of the Py3o render server, the first line looks like: .. code:: - DEBUG:root:Starting JVM: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so with options: -Djava.class.path=/usr/local/lib/python2.7/dist-packages/py3o/renderers/juno/py3oconverter.jar:/usr/lib/ure/share/java/juh.jar:/usr/lib/ure/share/java/jurt.jar:/usr/lib/ure/share/java/ridl.jar:/usr/lib/ure/share/java/unoloader.jar:/usr/lib/ure/share/java/java_uno.jar:/usr/lib/libreoffice/program/classes/unoil.jar -Xmx150M + 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 -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. On Ubuntu 16.04 LTS, the package *ure* installs several libs in another directory: - -* /usr/lib/ure/share/java/juh.jar is located in /usr/share/java/juh.jar -* /usr/lib/ure/share/java/jurt.jar is located in /usr/share/java/jurt.jar -* /usr/lib/ure/share/java/ridl.jar is located in /usr/share/java/ridl.jar -* /usr/lib/ure/share/java/unoloader.jar is located in /usr/share/java/unoloader.jar -* /usr/lib/ure/share/java/java_uno.jar is located in /usr/share/java/java_uno.jar - -To work around this problem, you can create a symlink: - -.. code:: - - sudo ln -s /usr /ure - -and then use **--ure=/** instead of **--ure=/usr/lib** in the command line of *start-py3o-renderserver*. +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 http://: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.*. @@ -125,9 +117,6 @@ For example, to replace the native invoice report by a custom py3o report, add t - Invoice - account.invoice - account.report_invoice py3o odt my_custom_module_base @@ -150,9 +139,6 @@ If you want an invoice in PDF format instead of ODT format, the XML file should - Invoice - account.invoice - account.report_invoice py3o pdf @@ -162,6 +148,37 @@ If you want an invoice in PDF format instead of ODT format, the XML file should +If you want to add a new py3o PDF report (and not replace a native report), the XML file should look like this: + +.. code:: + + + + + + http://localhost:8765/form + + + + Partner Summary + res.partner + res.partner.summary + py3o + pdf + + my_custom_module_base + report/partner_summary.odt + + + + + client_print_multi + res.partner + Partner Summary + + + + Usage =====