From 356aee95dd701f93380b4746f9e08dcc38c77431 Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Tue, 11 Feb 2025 10:22:38 +0100 Subject: [PATCH] [18.0][MIG] report_py3o --- report_py3o/README.rst | 254 ++++++++-------- report_py3o/__manifest__.py | 2 +- report_py3o/controllers/main.py | 11 +- report_py3o/models/py3o_report.py | 9 +- report_py3o/readme/CONFIGURE.md | 38 +++ report_py3o/readme/CONFIGURE.rst | 90 ------ report_py3o/readme/CONTRIBUTORS.md | 8 + report_py3o/readme/CONTRIBUTORS.rst | 7 - report_py3o/readme/DESCRIPTION.md | 45 +++ report_py3o/readme/DESCRIPTION.rst | 16 - report_py3o/readme/INSTALL.md | 8 + report_py3o/readme/INSTALL.rst | 12 - report_py3o/readme/ROADMAP.md | 3 + report_py3o/readme/ROADMAP.rst | 3 - report_py3o/readme/USAGE.md | 39 +++ report_py3o/readme/USAGE.rst | 29 -- report_py3o/static/description/index.html | 279 ++++++++---------- .../static/src/js/py3oactionservice.esm.js | 2 +- report_py3o/tests/test_report_py3o.py | 5 +- report_py3o/views/ir_actions_report.xml | 2 +- report_py3o/views/py3o_template.xml | 6 +- requirements.txt | 2 + 22 files changed, 400 insertions(+), 470 deletions(-) create mode 100644 report_py3o/readme/CONFIGURE.md delete mode 100644 report_py3o/readme/CONFIGURE.rst create mode 100644 report_py3o/readme/CONTRIBUTORS.md delete mode 100644 report_py3o/readme/CONTRIBUTORS.rst create mode 100644 report_py3o/readme/DESCRIPTION.md delete mode 100644 report_py3o/readme/DESCRIPTION.rst create mode 100644 report_py3o/readme/INSTALL.md delete mode 100644 report_py3o/readme/INSTALL.rst create mode 100644 report_py3o/readme/ROADMAP.md delete mode 100644 report_py3o/readme/ROADMAP.rst create mode 100644 report_py3o/readme/USAGE.md delete mode 100644 report_py3o/readme/USAGE.rst diff --git a/report_py3o/README.rst b/report_py3o/README.rst index f1c91bcdb6..c77c8dd4ce 100644 --- a/report_py3o/README.rst +++ b/report_py3o/README.rst @@ -17,33 +17,62 @@ Py3o Report Engine :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/16.0/report_py3o + :target: https://github.com/OCA/reporting-engine/tree/18.0/report_py3o :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-16-0/reporting-engine-16-0-report_py3o + :target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_py3o :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=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -The py3o reporting engine is a reporting engine for Odoo based on `Libreoffice `_: +The py3o reporting engine is a reporting engine for Odoo based on +[Libreoffice](http://www.libreoffice.org/): -* the report is created with Libreoffice (ODT or ODS), -* the report is stored on the server in OpenDocument format (.odt or .ods file) -* the report is sent to the user in OpenDocument format or in any output format supported by Libreoffice (PDF, HTML, DOC, DOCX, Docbook, XLS, etc.) +- the report is created with Libreoffice (ODT or ODS), +- the report is stored on the server in OpenDocument format (.odt or + .ods file) +- the report is sent to the user in OpenDocument format or in any + output format supported by Libreoffice (PDF, HTML, DOC, DOCX, + Docbook, XLS, etc.) The key advantages of a Libreoffice based reporting engine are: -* no need to be a developer to create or modify a report: the report is created and modified with Libreoffice. So this reporting engine has a full WYSIWYG report development tool! -* For a PDF report in A4/Letter format, it's easier to develop it with a tool such as Libreoffice that is designed to create A4/Letter documents than to develop it in HTML/CSS, also some print peculiarities (backgrounds, margin boxes) are not very well supported by the HTML/CSS based solutions. -* If you want your users to be able to modify the document after its generation by Odoo, just configure the document with ODT output (or DOC or DOCX) and the user will be able to modify the document with Libreoffice (or Word) after its generation by Odoo. -* Easy development of spreadsheet reports in ODS format (XLS output possible). - -This module *report_py3o* is the base module for the Py3o reporting engine. If used alone, it will spawn a libreoffice process for each ODT to PDF (or ODT to DOCX, ..) document conversion. This is slow and can become a problem if you have a lot of reports to convert from ODT to another format. In this case, you should consider the additionnal module *report_py3o_fusion_server* which is designed to work with a libreoffice daemon. With *report_py3o_fusion_server*, the technical environnement is more complex to setup because you have to install additionnal software components and run 2 daemons, but you have much better performances and you can configure the libreoffice PDF export options in Odoo (allows to generate PDF forms, PDF/A documents, password-protected PDFs, watermarked PDFs, etc.). - -This reporting engine is an alternative to `Aeroo `_: these two reporting engines have similar features but their implementation is entirely different. You cannot use aeroo templates as drop in replacement though, you'll have to change a few details. +- no need to be a developer to create or modify a report: the report is + created and modified with Libreoffice. So this reporting engine has a + full WYSIWYG report development tool! +- For a PDF report in A4/Letter format, it's easier to develop it with + a tool such as Libreoffice that is designed to create A4/Letter + documents than to develop it in HTML/CSS, also some print + peculiarities (backgrounds, margin boxes) are not very well supported + by the HTML/CSS based solutions. +- If you want your users to be able to modify the document after its + generation by Odoo, just configure the document with ODT output (or + DOC or DOCX) and the user will be able to modify the document with + Libreoffice (or Word) after its generation by Odoo. +- Easy development of spreadsheet reports in ODS format (XLS output + possible). + +This module *report_py3o* is the base module for the Py3o reporting +engine. If used alone, it will spawn a libreoffice process for each ODT +to PDF (or ODT to DOCX, ..) document conversion. This is slow and can +become a problem if you have a lot of reports to convert from ODT to +another format. In this case, you should consider the additionnal module +*report_py3o_fusion_server* which is designed to work with a libreoffice +daemon. With *report_py3o_fusion_server*, the technical environnement is +more complex to setup because you have to install additionnal software +components and run 2 daemons, but you have much better performances and +you can configure the libreoffice PDF export options in Odoo (allows to +generate PDF forms, PDF/A documents, password-protected PDFs, +watermarked PDFs, etc.). + +This reporting engine is an alternative to +[Aeroo](https://github.com/aeroo-community/aeroo_reports): these two +reporting engines have similar features but their implementation is +entirely different. You cannot use aeroo templates as drop in +replacement though, you'll have to change a few details. **Table of contents** @@ -55,150 +84,104 @@ Installation Install the required python libs: -.. code:: - - pip install py3o.template - pip install py3o.formats - -To allow the conversion of ODT or ODS reports to other formats (PDF, DOC, DOCX, etc.), install libreoffice: +:literal:`` pip install py3o.template pip install py3o.formats`\ \` -.. code:: +To allow the conversion of ODT or ODS reports to other formats (PDF, +DOC, DOCX, etc.), install libreoffice: - apt-get --no-install-recommends install libreoffice +:literal:`` apt-get --no-install-recommends install libreoffice`\ \` Configuration ============= -For example, to replace the native invoice report by a custom py3o report, add the following XML file in your custom module: - -.. code:: - - - - - - py3o - odt - my_custom_module_base - report/account_invoice.odt - - - +For example, to replace the native invoice report by a custom py3o +report, add the following XML file in your custom module: -where *my_custom_module_base* is the name of the custom Odoo module. In this example, the invoice ODT file is located in *my_custom_module_base/report/account_invoice.odt*. +:literal:`` py3o odt my_custom_module_base report/account_invoice.odt `\ \` -It's also possible to reference a template located in a trusted path of your -Odoo server. In this case you must let the *module* entry empty and specify -the path to the template as *py3o_template_fallback*. +where *my_custom_module_base* is the name of the custom Odoo module. In +this example, the invoice ODT file is located in +*my_custom_module_base/report/account_invoice.odt*. -.. code:: +It's also possible to reference a template located in a trusted path of +your Odoo server. In this case you must let the *module* entry empty and +specify the path to the template as *py3o_template_fallback*. - - +:literal:`` py3o odt /odoo/templates/py3o/report/account_invoice.odt `\ \` - - py3o - odt - /odoo/templates/py3o/report/account_invoice.odt - +Moreover, you must also modify the Odoo server configuration file to +declare the allowed root directory for your py3o templates. Only +templates located into this directory can be loaded by py3o report. - +:literal:`` [options] ... [report_py3o] root_tmpl_path=/odoo/templates/py3o`\ \` -Moreover, you must also modify the Odoo server configuration file to declare -the allowed root directory for your py3o templates. Only templates located -into this directory can be loaded by py3o report. +If you want an invoice in PDF format instead of ODT format, the XML file +should look like: -.. code:: +:literal:`` py3o pdf my_custom_module_base report/account_invoice.odt `\ \` - [options] - ... +If you want to add a new py3o PDF report (and not replace a native +report), the XML file should look like this: - [report_py3o] - root_tmpl_path=/odoo/templates/py3o +:literal:`` Partner Summary res.partner res.partner.summary py3o pdf my_custom_module_base report/partner_summary.odt report `\ \` -If you want an invoice in PDF format instead of ODT format, the XML file should look like: +## Configuration parameters -.. code:: +py3o.conversion_command The command to be used to run the conversion, +libreoffice by default. If you change this, whatever you set here must +accept the parameters --headless --convert-to $ext $file and put the +resulting file into $file's directory with extension $ext. The command +will be started in $file's directory. - - - - - py3o - pdf - my_custom_module_base - report/account_invoice.odt - - - - -If you want to add a new py3o PDF report (and not replace a native report), the XML file should look like this: +Usage +===== -.. code:: +The templating language is [extensively +documented](http://py3otemplate.readthedocs.io/en/latest/templating.html), +the records are exposed in libreoffice as objects, on which you can also +call functions. - - +## Available functions and objects - - Partner Summary - res.partner - res.partner.summary - py3o - pdf - my_custom_module_base - report/partner_summary.odt - - report - - +user Browse record of current user - +lang The user's company's language as string (ISO code) -Configuration parameters -~~~~~~~~~~~~~~~~~~~~~~~~ +b64decode base64.b64decode -py3o.conversion_command - The command to be used to run the conversion, ``libreoffice`` by default. If you change this, whatever you set here must accept the parameters ``--headless --convert-to $ext $file`` and put the resulting file into ``$file``'s directory with extension ``$ext``. The command will be started in ``$file``'s directory. +format_multiline_value(string) Generate the ODF equivalent of
and +  for multiline fields (ODF is XML internally, so those would be skipped +otherwise) -Usage -===== +html_sanitize(string) Sanitize HTML string -The templating language is `extensively documented `_, the records are exposed in libreoffice as ``objects``, on which you can also call functions. +time Python's time module -Available functions and objects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +display_address(partner) Return a formatted string of the partner's +address -user - Browse record of current user -lang - The user's company's language as string (ISO code) -b64decode - ``base64.b64decode`` -format_multiline_value(string) - Generate the ODF equivalent of ``
`` and `` `` for multiline fields (ODF is XML internally, so those would be skipped otherwise) -html_sanitize(string) - Sanitize HTML string -time - Python's ``time`` module -display_address(partner) - Return a formatted string of the partner's address -o_format_lang(value, lang_code=False, digits=None, grouping=True, monetary=False, dp=False, currency_obj=False, no_break_space=True) - Return a formatted numeric or monetary value according to the context language and timezone -o_format_date(value, lang_code=False, date_format=False) - Return a formatted date or time value according to the context language and timezone +o_format_lang(value, lang_code=False, digits=None, grouping=True, +monetary=False, dp=False, currency_obj=False, no_break_space=True) +Return a formatted numeric or monetary value according to the context +language and timezone +o_format_date(value, lang_code=False, date_format=False) Return a +formatted date or time value according to the context language and +timezone -Sample report templates -~~~~~~~~~~~~~~~~~~~~~~~ +## Sample report templates -Sample py3o report templates for the main Odoo native reports (invoice, sale order, purchase order, picking, etc.) are available on the Github project `odoo-py3o-report-templates `_. +Sample py3o report templates for the main Odoo native reports (invoice, +sale order, purchase order, picking, etc.) are available on the Github +project +[odoo-py3o-report-templates](https://github.com/akretion/odoo-py3o-report-templates). Known issues / Roadmap ====================== -* generate barcode ? -* add more detailed example in demo file to showcase features -* add migration guide aeroo -> py3o +- generate barcode ? +- add more detailed example in demo file to showcase features +- add migration guide aeroo -> py3o Bug Tracker =========== @@ -206,7 +189,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -214,24 +197,25 @@ Credits ======= Authors -~~~~~~~ +------- * XCG Consulting * ACSONE SA/NV Contributors -~~~~~~~~~~~~ +------------ -* Florent Aide (`XCG Consulting `_) -* Laurent Mignon , -* Alexis de Lattre , -* Guewen Baconnier -* Omar Casti??eira -* Holger Brunn -* Phuc Tran Thanh +- Florent Aide ([XCG Consulting](http://odoo.consulting/)) +- Laurent Mignon <>, +- Alexis de Lattre <>, +- Guewen Baconnier <> +- Omar Casti??eira <> +- Holger Brunn <> +- Phuc Tran Thanh <> +- Souheil Bejaoui <>, Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -243,6 +227,6 @@ 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 `_ project on GitHub. +This module is part of the `OCA/reporting-engine `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/report_py3o/__manifest__.py b/report_py3o/__manifest__.py index 6e72f9c298..ce9ddb60b1 100644 --- a/report_py3o/__manifest__.py +++ b/report_py3o/__manifest__.py @@ -4,7 +4,7 @@ "name": "Py3o Report Engine", "summary": "Reporting engine based on Libreoffice (ODT -> ODT, " "ODT -> PDF, ODT -> DOC, ODT -> DOCX, ODS -> ODS, etc.)", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "category": "Reporting", "license": "AGPL-3", "author": "XCG Consulting, ACSONE SA/NV, Odoo Community Association (OCA)", diff --git a/report_py3o/controllers/main.py b/report_py3o/controllers/main.py index 8d3938d60c..87d78d9c34 100644 --- a/report_py3o/controllers/main.py +++ b/report_py3o/controllers/main.py @@ -2,17 +2,18 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) import json import mimetypes +from urllib.parse import parse_qs from werkzeug import exceptions -from werkzeug.urls import url_decode +from werkzeug.datastructures import MultiDict from odoo.http import content_disposition, request, route, serialize_exception from odoo.tools import html_escape -from odoo.addons.web.controllers.report import ReportController +from odoo.addons.web.controllers.report import ReportController as ReportControllerBase -class ReportController(ReportController): +class ReportController(ReportControllerBase): @route() def report_routes(self, reportname, docids=None, converter=None, **data): if converter != "py3o": @@ -41,7 +42,7 @@ def report_routes(self, reportname, docids=None, converter=None, **data): if not action_py3o_report: raise exceptions.HTTPException( description="Py3o action report not found for report_name " - "%s" % reportname + f"{reportname}" ) res, filetype = ir_action._render(reportname, docids, data) filename = action_py3o_report.gen_report_download_filename(docids, data) @@ -82,7 +83,7 @@ def report_download(self, data, context=None, token=None): else: # Particular report: # decoding the args represented in JSON - data = list(url_decode(url.split("?")[1]).items()) + data = list(MultiDict(parse_qs(url.split("?")[1])).items()) response = self.report_routes( reportname, converter="py3o", **dict(data) ) diff --git a/report_py3o/models/py3o_report.py b/report_py3o/models/py3o_report.py index 75a8f5cd5c..e676f6aca4 100644 --- a/report_py3o/models/py3o_report.py +++ b/report_py3o/models/py3o_report.py @@ -270,10 +270,7 @@ def _convert_single_report(self, result_path, model_instance, data): result_path, result_filename = os.path.split(result_path) result_path = os.path.join( result_path, - "{}.{}".format( - os.path.splitext(result_filename)[0], - self.ir_actions_report_id.py3o_filetype, - ), + f"{os.path.splitext(result_filename)[0]}.{self.ir_actions_report_id.py3o_filetype}", ) return result_path @@ -297,7 +294,7 @@ def _convert_single_report_cmd( result_path, ] if user_installation: - cmd.append("-env:UserInstallation=file:%s" % user_installation) + cmd.append(f"-env:UserInstallation=file:{user_installation}") return cmd def _get_or_create_single_report( @@ -366,7 +363,7 @@ def _cleanup_tempfiles(self, temporary_files): try: os.unlink(temporary_file) except OSError: - logger.error("Error when trying to remove file %s" % temporary_file) + logger.error(f"Error when trying to remove file {temporary_file}") def create_report(self, res_ids, data): """Override this function to handle our py3o report""" diff --git a/report_py3o/readme/CONFIGURE.md b/report_py3o/readme/CONFIGURE.md new file mode 100644 index 0000000000..4bed1505c6 --- /dev/null +++ b/report_py3o/readme/CONFIGURE.md @@ -0,0 +1,38 @@ +For example, to replace the native invoice report by a custom py3o +report, add the following XML file in your custom module: + +`` ` py3o odt my_custom_module_base report/account_invoice.odt ``\` + +where *my_custom_module_base* is the name of the custom Odoo module. In +this example, the invoice ODT file is located in +*my_custom_module_base/report/account_invoice.odt*. + +It's also possible to reference a template located in a trusted path of +your Odoo server. In this case you must let the *module* entry empty and +specify the path to the template as *py3o_template_fallback*. + +`` ` py3o odt /odoo/templates/py3o/report/account_invoice.odt ``\` + +Moreover, you must also modify the Odoo server configuration file to +declare the allowed root directory for your py3o templates. Only +templates located into this directory can be loaded by py3o report. + +`` ` [options] ... [report_py3o] root_tmpl_path=/odoo/templates/py3o ``\` + +If you want an invoice in PDF format instead of ODT format, the XML file +should look like: + +`` ` py3o pdf my_custom_module_base report/account_invoice.odt ``\` + +If you want to add a new py3o PDF report (and not replace a native +report), the XML file should look like this: + +`` ` Partner Summary res.partner res.partner.summary py3o pdf my_custom_module_base report/partner_summary.odt report ``\` + +\## Configuration parameters + +py3o.conversion_command The command to be used to run the conversion, +libreoffice by default. If you change this, whatever you set here must +accept the parameters --headless --convert-to \$ext \$file and put the +resulting file into \$file's directory with extension \$ext. The command +will be started in \$file's directory. diff --git a/report_py3o/readme/CONFIGURE.rst b/report_py3o/readme/CONFIGURE.rst deleted file mode 100644 index 121d5cbb48..0000000000 --- a/report_py3o/readme/CONFIGURE.rst +++ /dev/null @@ -1,90 +0,0 @@ -For example, to replace the native invoice report by a custom py3o report, add the following XML file in your custom module: - -.. code:: - - - - - - py3o - odt - my_custom_module_base - report/account_invoice.odt - - - - -where *my_custom_module_base* is the name of the custom Odoo module. In this example, the invoice ODT file is located in *my_custom_module_base/report/account_invoice.odt*. - -It's also possible to reference a template located in a trusted path of your -Odoo server. In this case you must let the *module* entry empty and specify -the path to the template as *py3o_template_fallback*. - -.. code:: - - - - - - py3o - odt - /odoo/templates/py3o/report/account_invoice.odt - - - - -Moreover, you must also modify the Odoo server configuration file to declare -the allowed root directory for your py3o templates. Only templates located -into this directory can be loaded by py3o report. - -.. code:: - - [options] - ... - - [report_py3o] - root_tmpl_path=/odoo/templates/py3o - -If you want an invoice in PDF format instead of ODT format, the XML file should look like: - -.. code:: - - - - - - py3o - pdf - my_custom_module_base - report/account_invoice.odt - - - - -If you want to add a new py3o PDF report (and not replace a native report), the XML file should look like this: - -.. code:: - - - - - - Partner Summary - res.partner - res.partner.summary - py3o - pdf - my_custom_module_base - report/partner_summary.odt - - report - - - - - -Configuration parameters -~~~~~~~~~~~~~~~~~~~~~~~~ - -py3o.conversion_command - The command to be used to run the conversion, ``libreoffice`` by default. If you change this, whatever you set here must accept the parameters ``--headless --convert-to $ext $file`` and put the resulting file into ``$file``'s directory with extension ``$ext``. The command will be started in ``$file``'s directory. diff --git a/report_py3o/readme/CONTRIBUTORS.md b/report_py3o/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..b0414ef1ae --- /dev/null +++ b/report_py3o/readme/CONTRIBUTORS.md @@ -0,0 +1,8 @@ +- Florent Aide (\[XCG Consulting\]()) +- Laurent Mignon \<\<\>\>, +- Alexis de Lattre \<\<\>\>, +- Guewen Baconnier \<\<\>\> +- Omar Casti??eira \<\<\>\> +- Holger Brunn \<\<\>\> +- Phuc Tran Thanh \<\<\>\> +- Souheil Bejaoui \<\<\>\>, diff --git a/report_py3o/readme/CONTRIBUTORS.rst b/report_py3o/readme/CONTRIBUTORS.rst deleted file mode 100644 index 7f3d2b9039..0000000000 --- a/report_py3o/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,7 +0,0 @@ -* Florent Aide (`XCG Consulting `_) -* Laurent Mignon , -* Alexis de Lattre , -* Guewen Baconnier -* Omar Casti??eira -* Holger Brunn -* Phuc Tran Thanh diff --git a/report_py3o/readme/DESCRIPTION.md b/report_py3o/readme/DESCRIPTION.md new file mode 100644 index 0000000000..4f671dff37 --- /dev/null +++ b/report_py3o/readme/DESCRIPTION.md @@ -0,0 +1,45 @@ +The py3o reporting engine is a reporting engine for Odoo based on +\[Libreoffice\](): + +- the report is created with Libreoffice (ODT or ODS), +- the report is stored on the server in OpenDocument format (.odt or + .ods file) +- the report is sent to the user in OpenDocument format or in any output + format supported by Libreoffice (PDF, HTML, DOC, DOCX, Docbook, XLS, + etc.) + +The key advantages of a Libreoffice based reporting engine are: + +- no need to be a developer to create or modify a report: the report is + created and modified with Libreoffice. So this reporting engine has a + full WYSIWYG report development tool! +- For a PDF report in A4/Letter format, it's easier to develop it with a + tool such as Libreoffice that is designed to create A4/Letter + documents than to develop it in HTML/CSS, also some print + peculiarities (backgrounds, margin boxes) are not very well supported + by the HTML/CSS based solutions. +- If you want your users to be able to modify the document after its + generation by Odoo, just configure the document with ODT output (or + DOC or DOCX) and the user will be able to modify the document with + Libreoffice (or Word) after its generation by Odoo. +- Easy development of spreadsheet reports in ODS format (XLS output + possible). + +This module *report_py3o* is the base module for the Py3o reporting +engine. If used alone, it will spawn a libreoffice process for each ODT +to PDF (or ODT to DOCX, ..) document conversion. This is slow and can +become a problem if you have a lot of reports to convert from ODT to +another format. In this case, you should consider the additionnal module +*report_py3o_fusion_server* which is designed to work with a libreoffice +daemon. With *report_py3o_fusion_server*, the technical environnement is +more complex to setup because you have to install additionnal software +components and run 2 daemons, but you have much better performances and +you can configure the libreoffice PDF export options in Odoo (allows to +generate PDF forms, PDF/A documents, password-protected PDFs, +watermarked PDFs, etc.). + +This reporting engine is an alternative to +\[Aeroo\](): these two +reporting engines have similar features but their implementation is +entirely different. You cannot use aeroo templates as drop in +replacement though, you'll have to change a few details. diff --git a/report_py3o/readme/DESCRIPTION.rst b/report_py3o/readme/DESCRIPTION.rst deleted file mode 100644 index 97c8839562..0000000000 --- a/report_py3o/readme/DESCRIPTION.rst +++ /dev/null @@ -1,16 +0,0 @@ -The py3o reporting engine is a reporting engine for Odoo based on `Libreoffice `_: - -* the report is created with Libreoffice (ODT or ODS), -* the report is stored on the server in OpenDocument format (.odt or .ods file) -* the report is sent to the user in OpenDocument format or in any output format supported by Libreoffice (PDF, HTML, DOC, DOCX, Docbook, XLS, etc.) - -The key advantages of a Libreoffice based reporting engine are: - -* no need to be a developer to create or modify a report: the report is created and modified with Libreoffice. So this reporting engine has a full WYSIWYG report development tool! -* For a PDF report in A4/Letter format, it's easier to develop it with a tool such as Libreoffice that is designed to create A4/Letter documents than to develop it in HTML/CSS, also some print peculiarities (backgrounds, margin boxes) are not very well supported by the HTML/CSS based solutions. -* If you want your users to be able to modify the document after its generation by Odoo, just configure the document with ODT output (or DOC or DOCX) and the user will be able to modify the document with Libreoffice (or Word) after its generation by Odoo. -* Easy development of spreadsheet reports in ODS format (XLS output possible). - -This module *report_py3o* is the base module for the Py3o reporting engine. If used alone, it will spawn a libreoffice process for each ODT to PDF (or ODT to DOCX, ..) document conversion. This is slow and can become a problem if you have a lot of reports to convert from ODT to another format. In this case, you should consider the additionnal module *report_py3o_fusion_server* which is designed to work with a libreoffice daemon. With *report_py3o_fusion_server*, the technical environnement is more complex to setup because you have to install additionnal software components and run 2 daemons, but you have much better performances and you can configure the libreoffice PDF export options in Odoo (allows to generate PDF forms, PDF/A documents, password-protected PDFs, watermarked PDFs, etc.). - -This reporting engine is an alternative to `Aeroo `_: these two reporting engines have similar features but their implementation is entirely different. You cannot use aeroo templates as drop in replacement though, you'll have to change a few details. diff --git a/report_py3o/readme/INSTALL.md b/report_py3o/readme/INSTALL.md new file mode 100644 index 0000000000..175572cc33 --- /dev/null +++ b/report_py3o/readme/INSTALL.md @@ -0,0 +1,8 @@ +Install the required python libs: + +`` ` pip install py3o.template pip install py3o.formats ``\` + +To allow the conversion of ODT or ODS reports to other formats (PDF, +DOC, DOCX, etc.), install libreoffice: + +`` ` apt-get --no-install-recommends install libreoffice ``\` diff --git a/report_py3o/readme/INSTALL.rst b/report_py3o/readme/INSTALL.rst deleted file mode 100644 index 24bebaf4d0..0000000000 --- a/report_py3o/readme/INSTALL.rst +++ /dev/null @@ -1,12 +0,0 @@ -Install the required python libs: - -.. code:: - - pip install py3o.template - pip install py3o.formats - -To allow the conversion of ODT or ODS reports to other formats (PDF, DOC, DOCX, etc.), install libreoffice: - -.. code:: - - apt-get --no-install-recommends install libreoffice diff --git a/report_py3o/readme/ROADMAP.md b/report_py3o/readme/ROADMAP.md new file mode 100644 index 0000000000..f2a0de0672 --- /dev/null +++ b/report_py3o/readme/ROADMAP.md @@ -0,0 +1,3 @@ +- generate barcode ? +- add more detailed example in demo file to showcase features +- add migration guide aeroo -\> py3o diff --git a/report_py3o/readme/ROADMAP.rst b/report_py3o/readme/ROADMAP.rst deleted file mode 100644 index 568db673d8..0000000000 --- a/report_py3o/readme/ROADMAP.rst +++ /dev/null @@ -1,3 +0,0 @@ -* generate barcode ? -* add more detailed example in demo file to showcase features -* add migration guide aeroo -> py3o diff --git a/report_py3o/readme/USAGE.md b/report_py3o/readme/USAGE.md new file mode 100644 index 0000000000..384d2b5490 --- /dev/null +++ b/report_py3o/readme/USAGE.md @@ -0,0 +1,39 @@ +The templating language is \[extensively +documented\](), +the records are exposed in libreoffice as objects, on which you can also +call functions. + +\## Available functions and objects + +user Browse record of current user + +lang The user's company's language as string (ISO code) + +b64decode base64.b64decode + +format_multiline_value(string) Generate the ODF equivalent of \
+and   for multiline fields (ODF is XML internally, so those would +be skipped otherwise) + +html_sanitize(string) Sanitize HTML string + +time Python's time module + +display_address(partner) Return a formatted string of the partner's +address + +o_format_lang(value, lang_code=False, digits=None, grouping=True, +monetary=False, dp=False, currency_obj=False, no_break_space=True) +Return a formatted numeric or monetary value according to the context +language and timezone + +o_format_date(value, lang_code=False, date_format=False) Return a +formatted date or time value according to the context language and +timezone + +\## Sample report templates + +Sample py3o report templates for the main Odoo native reports (invoice, +sale order, purchase order, picking, etc.) are available on the Github +project +\[odoo-py3o-report-templates\](). diff --git a/report_py3o/readme/USAGE.rst b/report_py3o/readme/USAGE.rst deleted file mode 100644 index 7a4ba59d96..0000000000 --- a/report_py3o/readme/USAGE.rst +++ /dev/null @@ -1,29 +0,0 @@ -The templating language is `extensively documented `_, the records are exposed in libreoffice as ``objects``, on which you can also call functions. - -Available functions and objects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -user - Browse record of current user -lang - The user's company's language as string (ISO code) -b64decode - ``base64.b64decode`` -format_multiline_value(string) - Generate the ODF equivalent of ``
`` and `` `` for multiline fields (ODF is XML internally, so those would be skipped otherwise) -html_sanitize(string) - Sanitize HTML string -time - Python's ``time`` module -display_address(partner) - Return a formatted string of the partner's address -o_format_lang(value, lang_code=False, digits=None, grouping=True, monetary=False, dp=False, currency_obj=False, no_break_space=True) - Return a formatted numeric or monetary value according to the context language and timezone -o_format_date(value, lang_code=False, date_format=False) - Return a formatted date or time value according to the context language and timezone - - -Sample report templates -~~~~~~~~~~~~~~~~~~~~~~~ - -Sample py3o report templates for the main Odoo native reports (invoice, sale order, purchase order, picking, etc.) are available on the Github project `odoo-py3o-report-templates `_. diff --git a/report_py3o/static/description/index.html b/report_py3o/static/description/index.html index ce07dd7f72..ba129db46d 100644 --- a/report_py3o/static/description/index.html +++ b/report_py3o/static/description/index.html @@ -369,41 +369,63 @@

Py3o Report Engine

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:6475c7e18340a01f1070b14e0c403646da2a1e1381b73969ba16b91c163d4db7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

-

The py3o reporting engine is a reporting engine for Odoo based on Libreoffice:

+

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

+

The py3o reporting engine is a reporting engine for Odoo based on +[Libreoffice](http://www.libreoffice.org/):

  • the report is created with Libreoffice (ODT or ODS),
  • -
  • the report is stored on the server in OpenDocument format (.odt or .ods file)
  • -
  • the report is sent to the user in OpenDocument format or in any output format supported by Libreoffice (PDF, HTML, DOC, DOCX, Docbook, XLS, etc.)
  • +
  • the report is stored on the server in OpenDocument format (.odt or +.ods file)
  • +
  • the report is sent to the user in OpenDocument format or in any +output format supported by Libreoffice (PDF, HTML, DOC, DOCX, +Docbook, XLS, etc.)

The key advantages of a Libreoffice based reporting engine are:

    -
  • no need to be a developer to create or modify a report: the report is created and modified with Libreoffice. So this reporting engine has a full WYSIWYG report development tool!
  • -
  • For a PDF report in A4/Letter format, it???s easier to develop it with a tool such as Libreoffice that is designed to create A4/Letter documents than to develop it in HTML/CSS, also some print peculiarities (backgrounds, margin boxes) are not very well supported by the HTML/CSS based solutions.
  • -
  • If you want your users to be able to modify the document after its generation by Odoo, just configure the document with ODT output (or DOC or DOCX) and the user will be able to modify the document with Libreoffice (or Word) after its generation by Odoo.
  • -
  • Easy development of spreadsheet reports in ODS format (XLS output possible).
  • +
  • no need to be a developer to create or modify a report: the report is +created and modified with Libreoffice. So this reporting engine has a +full WYSIWYG report development tool!
  • +
  • For a PDF report in A4/Letter format, it’s easier to develop it with +a tool such as Libreoffice that is designed to create A4/Letter +documents than to develop it in HTML/CSS, also some print +peculiarities (backgrounds, margin boxes) are not very well supported +by the HTML/CSS based solutions.
  • +
  • If you want your users to be able to modify the document after its +generation by Odoo, just configure the document with ODT output (or +DOC or DOCX) and the user will be able to modify the document with +Libreoffice (or Word) after its generation by Odoo.
  • +
  • Easy development of spreadsheet reports in ODS format (XLS output +possible).
-

This module report_py3o is the base module for the Py3o reporting engine. If used alone, it will spawn a libreoffice process for each ODT to PDF (or ODT to DOCX, ..) document conversion. This is slow and can become a problem if you have a lot of reports to convert from ODT to another format. In this case, you should consider the additionnal module report_py3o_fusion_server which is designed to work with a libreoffice daemon. With report_py3o_fusion_server, the technical environnement is more complex to setup because you have to install additionnal software components and run 2 daemons, but you have much better performances and you can configure the libreoffice PDF export options in Odoo (allows to generate PDF forms, PDF/A documents, password-protected PDFs, watermarked PDFs, etc.).

-

This reporting engine is an alternative to Aeroo: these two reporting engines have similar features but their implementation is entirely different. You cannot use aeroo templates as drop in replacement though, you???ll have to change a few details.

+

This module report_py3o is the base module for the Py3o reporting +engine. If used alone, it will spawn a libreoffice process for each ODT +to PDF (or ODT to DOCX, ..) document conversion. This is slow and can +become a problem if you have a lot of reports to convert from ODT to +another format. In this case, you should consider the additionnal module +report_py3o_fusion_server which is designed to work with a libreoffice +daemon. With report_py3o_fusion_server, the technical environnement is +more complex to setup because you have to install additionnal software +components and run 2 daemons, but you have much better performances and +you can configure the libreoffice PDF export options in Odoo (allows to +generate PDF forms, PDF/A documents, password-protected PDFs, +watermarked PDFs, etc.).

+

This reporting engine is an alternative to +[Aeroo](https://github.com/aeroo-community/aeroo_reports): these two +reporting engines have similar features but their implementation is +entirely different. You cannot use aeroo templates as drop in +replacement though, you’ll have to change a few details.

Table of contents

  • Installation
  • -
  • Configuration -
  • -
  • Usage -
  • -
  • Known issues / Roadmap
  • -
  • Bug Tracker
  • -
  • Credits @@ -411,132 +433,72 @@

    Py3o Report Engine

    Installation

    Install the required python libs:

    -
    -pip install py3o.template
    -pip install py3o.formats
    -
    -

    To allow the conversion of ODT or ODS reports to other formats (PDF, DOC, DOCX, etc.), install libreoffice:

    -
    -apt-get --no-install-recommends install libreoffice
    -
    +

    :literal:`` pip install py3o.template pip install py3o.formats``

    +

    To allow the conversion of ODT or ODS reports to other formats (PDF, +DOC, DOCX, etc.), install libreoffice:

    +

    :literal:`` apt-get –no-install-recommends install libreoffice``

    Configuration

    -

    For example, to replace the native invoice report by a custom py3o report, add the following XML file in your custom module:

    -
    -<?xml version="1.0" encoding="utf-8"?>
    -<odoo>
    -
    -<record id="account.account_invoices" model="ir.actions.report">
    -    <field name="report_type">py3o</field>
    -    <field name="py3o_filetype">odt</field>
    -    <field name="module">my_custom_module_base</field>
    -    <field name="py3o_template_fallback">report/account_invoice.odt</field>
    -</record>
    -
    -</odoo>
    -
    -

    where my_custom_module_base is the name of the custom Odoo module. In this example, the invoice ODT file is located in my_custom_module_base/report/account_invoice.odt.

    -

    It???s also possible to reference a template located in a trusted path of your -Odoo server. In this case you must let the module entry empty and specify -the path to the template as py3o_template_fallback.

    -
    -<?xml version="1.0" encoding="utf-8"?>
    -<odoo>
    -
    -<record id="account.account_invoices" model="ir.actions.report">
    -    <field name="report_type">py3o</field>
    -    <field name="py3o_filetype">odt</field>
    -    <field name="py3o_template_fallback">/odoo/templates/py3o/report/account_invoice.odt</field>
    -</record>
    -
    -</odoo>
    -
    -

    Moreover, you must also modify the Odoo server configuration file to declare -the allowed root directory for your py3o templates. Only templates located -into this directory can be loaded by py3o report.

    -
    -[options]
    -...
    -
    -[report_py3o]
    -root_tmpl_path=/odoo/templates/py3o
    -
    -

    If you want an invoice in PDF format instead of ODT format, the XML file should look like:

    -
    -<?xml version="1.0" encoding="utf-8"?>
    -<odoo>
    -
    -<record id="account.account_invoices" model="ir.actions.report">
    -    <field name="report_type">py3o</field>
    -    <field name="py3o_filetype">pdf</field>
    -    <field name="module">my_custom_module_base</field>
    -    <field name="py3o_template_fallback">report/account_invoice.odt</field>
    -</record>
    -
    -</odoo>
    -
    -

    If you want to add a new py3o PDF report (and not replace a native report), the XML file should look like this:

    -
    -<?xml version="1.0" encoding="utf-8"?>
    -<odoo>
    -
    -<record id="partner_summary_report" model="ir.actions.report">
    -    <field name="name">Partner Summary</field>
    -    <field name="model">res.partner</field>
    -    <field name="report_name">res.partner.summary</field>
    -    <field name="report_type">py3o</field>
    -    <field name="py3o_filetype">pdf</field>
    -    <field name="module">my_custom_module_base</field>
    -    <field name="py3o_template_fallback">report/partner_summary.odt</field>
    -    <!-- Add entry in "Print" drop-down list -->
    -    <field name="binding_type">report</field>
    -    <field name="binding_model_id" ref="base.model_res_partner"/>
    -</record>
    -
    -</odoo>
    -
    -
    -

    Configuration parameters

    -
    -
    py3o.conversion_command
    -
    The command to be used to run the conversion, libreoffice by default. If you change this, whatever you set here must accept the parameters --headless --convert-to $ext $file and put the resulting file into $file???s directory with extension $ext. The command will be started in $file???s directory.
    -
    -
    +

    For example, to replace the native invoice report by a custom py3o +report, add the following XML file in your custom module:

    +

    :literal:`` <?xml version=”1.0” encoding=”utf-8”?> <odoo> <record id=”account.account_invoices” model=”ir.actions.report”> <field name=”report_type”>py3o</field> <field name=”py3o_filetype”>odt</field> <field name=”module”>my_custom_module_base</field> <field name=”py3o_template_fallback”>report/account_invoice.odt</field> </record> </odoo>``

    +

    where my_custom_module_base is the name of the custom Odoo module. In +this example, the invoice ODT file is located in +my_custom_module_base/report/account_invoice.odt.

    +

    It’s also possible to reference a template located in a trusted path of +your Odoo server. In this case you must let the module entry empty and +specify the path to the template as py3o_template_fallback.

    +

    :literal:`` <?xml version=”1.0” encoding=”utf-8”?> <odoo> <record id=”account.account_invoices” model=”ir.actions.report”> <field name=”report_type”>py3o</field> <field name=”py3o_filetype”>odt</field> <field name=”py3o_template_fallback”>/odoo/templates/py3o/report/account_invoice.odt</field> </record> </odoo>``

    +

    Moreover, you must also modify the Odoo server configuration file to +declare the allowed root directory for your py3o templates. Only +templates located into this directory can be loaded by py3o report.

    +

    :literal:`` [options] … [report_py3o] root_tmpl_path=/odoo/templates/py3o``

    +

    If you want an invoice in PDF format instead of ODT format, the XML file +should look like:

    +

    :literal:`` <?xml version=”1.0” encoding=”utf-8”?> <odoo> <record id=”account.account_invoices” model=”ir.actions.report”> <field name=”report_type”>py3o</field> <field name=”py3o_filetype”>pdf</field> <field name=”module”>my_custom_module_base</field> <field name=”py3o_template_fallback”>report/account_invoice.odt</field> </record> </odoo>``

    +

    If you want to add a new py3o PDF report (and not replace a native +report), the XML file should look like this:

    +

    :literal:`` <?xml version=”1.0” encoding=”utf-8”?> <odoo> <record id=”partner_summary_report” model=”ir.actions.report”> <field name=”name”>Partner Summary</field> <field name=”model”>res.partner</field> <field name=”report_name”>res.partner.summary</field> <field name=”report_type”>py3o</field> <field name=”py3o_filetype”>pdf</field> <field name=”module”>my_custom_module_base</field> <field name=”py3o_template_fallback”>report/partner_summary.odt</field> <!– Add entry in “Print” drop-down list –> <field name=”binding_type”>report</field> <field name=”binding_model_id” ref=”base.model_res_partner”/> </record> </odoo>``

    +

    ## Configuration parameters

    +

    py3o.conversion_command The command to be used to run the conversion, +libreoffice by default. If you change this, whatever you set here must +accept the parameters –headless –convert-to $ext $file and put the +resulting file into $file’s directory with extension $ext. The command +will be started in $file’s directory.

    -

    Usage

    -

    The templating language is extensively documented, the records are exposed in libreoffice as objects, on which you can also call functions.

    -
    -

    Available functions and objects

    -
    -
    user
    -
    Browse record of current user
    -
    lang
    -
    The user???s company???s language as string (ISO code)
    -
    b64decode
    -
    base64.b64decode
    -
    format_multiline_value(string)
    -
    Generate the ODF equivalent of <br/> and &nbsp; for multiline fields (ODF is XML internally, so those would be skipped otherwise)
    -
    html_sanitize(string)
    -
    Sanitize HTML string
    -
    time
    -
    Python???s time module
    -
    display_address(partner)
    -
    Return a formatted string of the partner???s address
    -
    o_format_lang(value, lang_code=False, digits=None, grouping=True, monetary=False, dp=False, currency_obj=False, no_break_space=True)
    -
    Return a formatted numeric or monetary value according to the context language and timezone
    -
    o_format_date(value, lang_code=False, date_format=False)
    -
    Return a formatted date or time value according to the context language and timezone
    -
    -
    -
    -

    Sample report templates

    -

    Sample py3o report templates for the main Odoo native reports (invoice, sale order, purchase order, picking, etc.) are available on the Github project odoo-py3o-report-templates.

    -
    +

    Usage

    +

    The templating language is [extensively +documented](http://py3otemplate.readthedocs.io/en/latest/templating.html), +the records are exposed in libreoffice as objects, on which you can also +call functions.

    +

    ## Available functions and objects

    +

    user Browse record of current user

    +

    lang The user’s company’s language as string (ISO code)

    +

    b64decode base64.b64decode

    +

    format_multiline_value(string) Generate the ODF equivalent of <br/> and +  for multiline fields (ODF is XML internally, so those would be skipped +otherwise)

    +

    html_sanitize(string) Sanitize HTML string

    +

    time Python’s time module

    +

    display_address(partner) Return a formatted string of the partner’s +address

    +

    o_format_lang(value, lang_code=False, digits=None, grouping=True, +monetary=False, dp=False, currency_obj=False, no_break_space=True) +Return a formatted numeric or monetary value according to the context +language and timezone

    +

    o_format_date(value, lang_code=False, date_format=False) Return a +formatted date or time value according to the context language and +timezone

    +

    ## Sample report templates

    +

    Sample py3o report templates for the main Odoo native reports (invoice, +sale order, purchase order, picking, etc.) are available on the Github +project +[odoo-py3o-report-templates](https://github.com/akretion/odoo-py3o-report-templates).

    -

    Known issues / Roadmap

    +

    Known issues / Roadmap

    • generate barcode ?
    • add more detailed example in demo file to showcase features
    • @@ -544,36 +506,37 @@

      Known issues / Roadmap

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub 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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • XCG Consulting
    • ACSONE SA/NV
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -581,7 +544,7 @@

    Maintainers

    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 project on GitHub.

    +

    This module is part of the OCA/reporting-engine project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/report_py3o/static/src/js/py3oactionservice.esm.js b/report_py3o/static/src/js/py3oactionservice.esm.js index 8e8fec1b69..597b014b61 100644 --- a/report_py3o/static/src/js/py3oactionservice.esm.js +++ b/report_py3o/static/src/js/py3oactionservice.esm.js @@ -34,7 +34,7 @@ registry url: "/report/download", data: { data: JSON.stringify([url, action.report_type]), - context: JSON.stringify(env.services.user.context), + context: JSON.stringify(action.context), }, }); } finally { diff --git a/report_py3o/tests/test_report_py3o.py b/report_py3o/tests/test_report_py3o.py index 1042a438a2..58d8d21582 100644 --- a/report_py3o/tests/test_report_py3o.py +++ b/report_py3o/tests/test_report_py3o.py @@ -11,8 +11,7 @@ from importlib.resources import as_file, files from unittest import mock -from PyPDF2 import PdfFileWriter -from PyPDF2.pdf import PageObject +from PyPDF2 import PageObject, PdfFileWriter from odoo import tools from odoo.exceptions import ValidationError @@ -206,7 +205,7 @@ def test_report_template_fallback_validity(self): self.assertTrue(self.py3o_report._get_template_from_path(tmp_filename)) # check security self.assertFalse( - self.py3o_report._get_template_from_path("rm -rf . & %s" % flbk_filename) + self.py3o_report._get_template_from_path(f"rm -rf . & {flbk_filename}") ) # a file in a non native LibreOffice format is not a valid template with tempfile.NamedTemporaryFile(suffix=".toto") as f: diff --git a/report_py3o/views/ir_actions_report.xml b/report_py3o/views/ir_actions_report.xml index 6b3ac724bc..8669dce1fd 100644 --- a/report_py3o/views/ir_actions_report.xml +++ b/report_py3o/views/ir_actions_report.xml @@ -6,7 +6,7 @@ ir.actions.report - +