Package: odoo14-addon-report-qweb-signer
This module extends the functionality of report module to sign
PDFs using a PKCS#12 certificate.Table of contentsInstallationConfigurationJava Memory SettingsUsageKnown issues / RoadmapBug TrackerCreditsAuthorsContributorsOther creditsExternal utilitiesIconMaintainersInstallationTo install this module, you need to install Java JDK Headlees, e.g.:apt-get install default-jre-headlessConfigurationIn order to start signing PDF documents you need to configure certificate(s)
to use in your company.Go toSettings > Companies > Companies > Your companyGo toReport configurationtabClickEditAdd a new item inPDF report certificateslistClickCreateSet name, certificate file, password file and modelOptionally you can set a domain and filename pattern for saving as attachmentFor example, if you want to sign only customer invoices in posted state:Model:account.moveDomain:[('move_type','=','out_invoice'),('state','=','posted')]Save as attachment:(object.name or'').replace('/','_')+ '.signed.pdf'Note: Linux user that executes Odoo server process must have
read access to certificate file and password fileJava Memory SettingsIf 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_ARGSenvironment variable that
contains the required flags. Check out these links too:StackOverflow answer.Java docs.UsageUser 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”.You can set extra parameters of JSignPdf library in the system parameter
named ‘report_qweb_signer.java_position_parameters’, for example ‘-V’ to
visible signature into pdf. You can also set extra parameters for Java in the
system parameter named ‘report_qweb_signer.java_parameters’.Known issues / RoadmapWhen 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.Add tests.Why not taking the occasion to add the whole configuration at report level
(if to be signed or not, the domain, etc…)?
Seehttps://github.com/OCA/reporting-engine/pull/533#issuecomment-898321161Bug TrackerBugs are tracked onGitHub 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 welcomedfeedback.Do not contact contributors directly about support or help with technical issues.CreditsAuthorsTecnativaContributorsTecnativa:Rafael BlascoAntonio EspinosaPedro M. BaezaJairo LlopisDavid VidalSanti Argüeso <santi@comunitea.com>Omar Castiñeira <omar@comunitea.com>Punt Sistemes:Isaac Gallart <igallart@puntsistemes.es>Other creditsExternal utilitiesJSignPdf: © Josef Cacek - LicenseMPLorLGPL2-http://jsignpdf.sourceforge.net/IconCreated by Anton Noskov from the Noun ProjectMaintainersThis 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 theOCA/reporting-engineproject on GitHub.You are welcome to contribute. To learn how please visithttps://odoo-community.org/page/Contribute.