Qweb PDF reports signer
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
Contributors
-
Rafael Blasco
Antonio Espinosa
Pedro M. Baeza
Jairo Llopis
David Vidal
Santi Argüeso <santi@comunitea.com>
Omar Castiñeira <omar@comunitea.com>
-
Isaac Gallart <igallart@puntsistemes.es>
Other credits
Icon
Maintainers
This module is maintained by the OCA.
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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| odoo_addon_report_qweb_signer-18.0.1.0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / odoo_addon_report_qweb_signer-18.0.1.0.0.3-py3-none-any.whl
| Download URL | odoo_addon_report_qweb_signer-18.0.1.0.0.3-py3-none-any.whl |
|---|---|
| Size | 168.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f518c4fad339c2b3a42afafbf99ee259e46096d1a852e0db810f8392bd8ba243
|
|
BLAKE2b-256 checksum How to use checksums |
afcfd5e25f2d29a198bb5062018f3ba4506ba8cd87992fe339985793669aa18c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|