Sign Qweb PDFs usign a PKCS#12 certificate
Project description
Qweb PDF reports signer
This module extends the functionality of report module to sign PDFs using a PKCS#12 certificate.
Installation
To install this module, you need to install Java JDK:
apt-get install openjdk-7-jre-headless
Configuration
In order to start signing PDF documents you need to configure certificate(s) to use in your company.
Go to Settings > Companies > Companies > Your company
Go to Report configuration tab
Click Edit
Add a new item in PDF report certificates list
Click Create
Set name, certificate file, password file and model
Optionally you can set a domain and filename pattern for saving as attachment
For example, if you want to sign only customer invoices in open or paid state:
Model: account.invoice
Domain: [('type','=','out_invoice'), ('state', 'in', ('open', 'paid'))]
Save as attachment: (object.number or '').replace('/','_') + '.signed.pdf'
Note: Linux user that executes Odoo server process must have read access to certificate file and password file
Java Memory Settings
If you are signing large amounts of reports at the same time, or if you have a lower worker memory size than the JVM defaults, you may need to tune the JVM heap memory limits. Do so by adding a $JVM_ARGS environment variable that contains the required flags. Check out these links too:
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
When signing multiple documents (if ‘Allow only one document’ is disable) then ‘Save as attachment’ is not applied and signed result is not saved as attachment.
To have a visible signature through an image embedded in the resulting PDF.
Add tests.
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 smashing it by providing a detailed and welcomed feedback here.
Credits
External utilities
iText v1.4.8: © 2000-2006, Paulo Soares, Bruno Lowagie and others - License MPL or LGPL2 - http://sourceforge.net/projects/itext
jPdfSign: © 2006 Jan Peter Stotz - License MPL or LGPL2 (inherited from iText) - http://private.sit.fraunhofer.de/~stotz/software/jpdfsign
Modified jPdfSign: © 2015 Antonio Espinosa - License MPL or LGPL2 (inherited from iText) - static/src/java/JPdfSign.java
Icon
Contributors
Rafael Blasco <rafael.blasco@tecnativa.com>
Antonio Espinosa <antonio.espinosa@tecnativa.com>
Pedro M. Baeza <pedro.baeza@tecnativa.com>
Jairo Llopis <jairo.llopis@tecnativa.com>
Maintainer
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.
To contribute to this module, please visit https://odoo-community.org.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file odoo10_addon_report_qweb_signer-10.0.1.0.1-py2-none-any.whl
.
File metadata
- Download URL: odoo10_addon_report_qweb_signer-10.0.1.0.1-py2-none-any.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ab62c8390f45149f38a6e2428324e861c3e7f4b1790a629c60d55d0752800f |
|
MD5 | 5660472be890bec021aa2d972e86854e |
|
BLAKE2b-256 | 3a7836e1f5a254893d45039257dc225da309430749cb13fc58a5165f26a66a68 |