Skip to main content
Odoo Community Association

Qweb PDF reports signer

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

This module extends the functionality of reports to sign PDFs using a PKCS#12 certificate.

Table of contents

Installation

To install this module, you need to install pyhanko-cli, e.g.:

pipx install pyhanko-cli

Configuration

To start signing PDF reports you’ll need first to configure your desired certificate. To do so:

  • Go to Settings > General Settings and then to the section Certificates and Keys. Then click on Certificates.

  • Add the cert you want to use: upload the file and set the password.

Now you need to configure the reports using this certificate:

  • Go to Settings > Thecnical > Reporting > Reports.

  • Search for the pdf report you want to sign.

  • In the report form, open the Sign tab.

  • Choose the Certificate you created before.

  • Optionally, you can set:

    • Allow to sign only one document: disallow signing a pdf that contains multiple docs.

    • Save as attachment: Set the signed document report file name pattern. Example: (object.name or '').replace('/','_') + '.signed.pdf'

    • Signing domain: Filter the document that will be signed. Example: [('move_type','=','out_invoice'), ('state', '=', 'posted')]

Usage

User just prints PDF documents (only Qweb PDF reports supported) as usual, but signed PDF is automatically downloaded if this document model is configured as indicated above.

If ‘Save as attachment’ is configured, signed PDF is saved as attachment and next time saved one is downloaded without signing again. This is appropiate when signing date is important, for example, when signing customer invoices.

You can try the signing with the demo report that is included for customers called “Test PDF certificate”.

Known issues / Roadmap

  • This version 18.0 depends on pyhanko-cli for signing the documents, which isn’t ideal at all but avoids the dependency hell coming from cryptography requisites.

  • In Odoo 19.0 Odoo implemented their own signing mechanism. We could backport it but it depends on python 12 which supports the proper cryptography library version and that would leave out any infrastructure using lower versions. So: for v19 we should get rid of all that external stuff and just use the core one. (ref: https://github.com/odoo/odoo/pull/194698)

  • When signing multiple documents (if Allow only one document is disabled) then Save as attachment is not applied and signed result is not saved as attachment.

  • Add more tests.

  • This module is incompatible with the account_edi_ubl_cii module, because the PDF content is altered after rendering. See: https://github.com/odoo/odoo/blob/5977da2c93d522ece984d2fa8a31624f4b612eca/addons/account_edi_ubl_cii/models/account_move_send.py#L131C9-L140

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.

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

Credits

Authors

  • Tecnativa

Contributors

Other credits

Icon

Created by Anton Noskov from the Noun Project

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

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

Metadata

Release files for odoo-addon-report-qweb-signer 18.0.1.0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-report-qweb-signer 18.0.1.0.0.2
File Interpreter ABI Platform
odoo_addon_report_qweb_signer-18.0.1.0.0.2-py3-none-any.whl Python 3 none any Details

Release files / odoo_addon_report_qweb_signer-18.0.1.0.0.2-py3-none-any.whl

Download URL odoo_addon_report_qweb_signer-18.0.1.0.0.2-py3-none-any.whl
Size 168.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5928bdd6ebfa8fed6d8939e2e2e0204fad481da92a266c191bda7e805082b621
BLAKE2b-256 checksum
How to use checksums
33dacd7a5bb7ea622b189dcb618a51049361704561916857f3afeb53b867014b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page