-
-
Notifications
You must be signed in to change notification settings - Fork 878
[19.0][MIG] report_py3o_fusion_server: Migration to 19.0 #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kopeyev
wants to merge
48
commits into
OCA:19.0
Choose a base branch
from
kopeyev:19.0-mig-report_py3o_fusion_server
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+47,486
−0
Open
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
c59db1a
[RFR] split off the fusion server to its own module
hbrunn 20ff7df
Improve README.rst for report_py3o* modules
alexis-via 49f5b14
OCA Transbot updated translations from Transifex
oca-transbot 4d03208
[FIX] fallback to libreoffice conversion when no server is configured
hbrunn 62125ad
report_py3o_fusion_server: Add support for PDF Export options of libr…
alexis-via 305af0e
report_py3o_fusion_server: Update README.rst
alexis-via 107f35f
report_py3o_fusion_server: Add chronometer
alexis-via 9a9a71c
Fix wrong default value
alexis-via 0471352
Improve README.rst to help those that want to produce fully valid PDF…
alexis-via a177ba8
[UPD] Update report_py3o_fusion_server.pot
oca-travis d74c8c2
[MIG] report_py3o, report_py3o_fusion_server: Migration to 12.0
lmignon 66effb3
[FIX] report_py3o_fusion_server: requests.post returns bytes not str
lmignon 03ab82e
[IMP][FIX] py3o_report, py3o_report_fusion_server: Compute the availa…
lmignon 055d66a
[FIX] report_py3o: respect _postprocess_report method signature
houzefa-abba bb33e20
[UPD] Update report_py3o_fusion_server.pot
oca-travis 67b03a1
Update translation files
oca-transbot d843bf2
Update README for report_py3o and report_py3o_fusion_server (#306)
alexis-via d70c3a1
[UPD] README.rst
OCA-git-bot 4f029e9
[IMP] report_py3o, report_py3o_fusion_server: black, isort
lmignon b601bd2
[MIG] report_py3o, report_py3o_fusion_server: Migration to 13.0
lmignon 3e1abb1
Make sure value is always set for computed fields
dupski 3413320
[FIX] report_py3o: prettier xml after merge with master
lmignon bd2719d
[UPD] Update report_py3o_fusion_server.pot
oca-travis 5007b77
[UPD] README.rst
OCA-git-bot 79878c5
Update translation files
oca-transbot 92b12b9
Update translation files
oca-transbot e4d5445
[MIG] report_py3o_fusion_server to 14.0
alexis-via e470aa5
[UPD] Update report_py3o_fusion_server.pot
oca-travis aa3ec97
[UPD] README.rst
OCA-git-bot 7f38a35
report_py3o_fusion_server: add deb external dependencies
sbidoul 0fda26b
[MIG] report_py3o_fusion_server to v16
alexis-via 99b36f1
[UPD] Update report_py3o_fusion_server.pot
01ace7d
Update translation files
weblate bbc92f5
Update translation files
weblate e3ac13d
Translated using Weblate (Spanish)
Ivorra78 e107783
Translated using Weblate (Italian)
mymage 3d09c79
Translated using Weblate (Italian)
mymage 9067974
Translated using Weblate (Italian)
mymage cd54789
Translated using Weblate (Swedish)
jakobkrabbe 53cd260
[IMP] report_py3o_fusion_server: black, isort, prettier
JasminSForgeFlow 05016ff
[MIG] report_py3o_fusion_server: Migration to 18.0
JasminSForgeFlow 8554aea
[UPD] Update report_py3o_fusion_server.pot
578b72a
[BOT] post-merge updates
OCA-git-bot 46d623f
[UPD] Update report_py3o_fusion_server.pot
8ccdfc7
Update translation files
weblate 98b3e2f
Translated using Weblate (Slovenian)
sysadminmatmoz a68eb79
[IMP] report_py3o_fusion_server: pre-commit auto fixes
kopeyev f6ae929
[MIG] report_py3o_fusion_server: Migration to 19.0
kopeyev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,224 @@ | ||
| .. image:: https://odoo-community.org/readme-banner-image | ||
| :target: https://odoo-community.org/get-involved?utm_source=readme | ||
| :alt: Odoo Community Association | ||
|
|
||
| ========================================== | ||
| Py3o Report Engine - Fusion server support | ||
| ========================================== | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:abe1267ad8b04d3171b35731fe78f8f1fd25c48420962cc8f5096462bb84fb66 | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
| :target: https://odoo-community.org/page/development-status | ||
| :alt: Beta | ||
| .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
| :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
| :alt: License: AGPL-3 | ||
| .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github | ||
| :target: https://github.com/OCA/reporting-engine/tree/19.0/report_py3o_fusion_server | ||
| :alt: OCA/reporting-engine | ||
| .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
| :target: https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_py3o_fusion_server | ||
| :alt: Translate me on Weblate | ||
| .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
| :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=19.0 | ||
| :alt: Try me on Runboat | ||
|
|
||
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| 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 <http://fnfe-mpe.org/factur-x/factur-x_en/>`__) | ||
| - watermarked PDF documents | ||
| - password-protected PDF documents | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Installation | ||
| ============ | ||
|
|
||
| Install several additional components and Python libs: | ||
|
|
||
| - `Py3o Fusion server <https://bitbucket.org/faide/py3o.fusion>`__, | ||
| - `Py3o render | ||
| server <https://bitbucket.org/faide/py3o.renderserver>`__, | ||
| - 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 | ||
| 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.*. | ||
|
|
||
| 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 | ||
|
|
||
| Configuration | ||
| ============= | ||
|
|
||
| To configure the PDF export options: | ||
|
|
||
| 1. Go to the menu *Settings > Technical > Reporting > Py3o > Py3o PDF | ||
| Export Options* and create a PDF export options profile. | ||
| 2. 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*). | ||
|
|
||
| Known issues / Roadmap | ||
| ====================== | ||
|
|
||
| - Add support for PDF signatures (possible, but no easy because the | ||
| signature certificate is a very particular PDF export option) | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_. | ||
| In case of trouble, please check there if your issue has already been reported. | ||
| If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
| `feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_py3o_fusion_server%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
|
||
| Do not contact contributors directly about support or help with technical issues. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Authors | ||
| ------- | ||
|
|
||
| * XCG Consulting | ||
| * ACSONE SA/NV | ||
| * Akretion | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| - Florent Aide (`XCG Consulting <http://odoo.consulting/>`__) | ||
| - Laurent Mignon <[email protected]>, | ||
| - Alexis de Lattre <[email protected]>, | ||
| - Guewen Baconnier <[email protected]> | ||
| - Omar Castiñeira <[email protected]> | ||
| - Holger Brunn <[email protected]> | ||
|
|
||
| Maintainers | ||
| ----------- | ||
|
|
||
| This module is maintained by the OCA. | ||
|
|
||
| .. image:: https://odoo-community.org/logo.png | ||
| :alt: Odoo Community Association | ||
| :target: https://odoo-community.org | ||
|
|
||
| OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
| mission is to support the collaborative development of Odoo features and | ||
| promote its widespread use. | ||
|
|
||
| This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/19.0/report_py3o_fusion_server>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Copyright 2017 Therp BV <http://therp.nl> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
| from . import models | ||
| from . import wizard | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Copyright 2017 Therp BV <http://therp.nl> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
| { | ||
| "name": "Py3o Report Engine - Fusion server support", | ||
| "summary": "Let the fusion server handle format conversion.", | ||
| "version": "19.0.1.0.0", | ||
| "category": "Reporting", | ||
| "license": "AGPL-3", | ||
| "author": "XCG Consulting,ACSONE SA/NV,Akretion,Odoo Community Association (OCA)", | ||
| "website": "https://github.com/OCA/reporting-engine", | ||
| "depends": ["report_py3o"], | ||
| "external_dependencies": { | ||
| "python": ["py3o.template", "py3o.formats", "mock"], | ||
| "deb": ["libreoffice"], | ||
| }, | ||
| "demo": ["demo/report_py3o.xml", "demo/py3o_pdf_options.xml"], | ||
| "data": [ | ||
| "views/ir_actions_report.xml", | ||
| "security/ir.model.access.csv", | ||
| "views/py3o_server.xml", | ||
| "views/py3o_pdf_options.xml", | ||
| ], | ||
| "installable": True, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <odoo> | ||
| <record id="py3o_pdf_options_pdfa" model="py3o.pdf.options"> | ||
| <field name="name">PDF/A (for Factur-X invoices)</field> | ||
| <field name="pdfa" eval="True" /> | ||
| </record> | ||
| </odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <odoo> | ||
| <record id="report_py3o.res_users_report_py3o" model="ir.actions.report"> | ||
| <field name="py3o_is_local_fusion" eval="1" /> | ||
| </record> | ||
| </odoo> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.