OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
5.9 KiB

  1. =======================
  2. Qweb PDF reports signer
  3. =======================
  4. .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  5. !! This file is generated by oca-gen-addon-readme !!
  6. !! changes will be overwritten. !!
  7. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8. .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
  9. :target: https://odoo-community.org/page/development-status
  10. :alt: Beta
  11. .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
  12. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  13. :alt: License: AGPL-3
  14. .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
  15. :target: https://github.com/OCA/reporting-engine/tree/12.0/report_qweb_signer
  16. :alt: OCA/reporting-engine
  17. .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
  18. :target: https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-report_qweb_signer
  19. :alt: Translate me on Weblate
  20. .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
  21. :target: https://runbot.odoo-community.org/runbot/143/12.0
  22. :alt: Try me on Runbot
  23. |badge1| |badge2| |badge3| |badge4| |badge5|
  24. This module extends the functionality of report module to sign
  25. PDFs using a PKCS#12 certificate.
  26. **Table of contents**
  27. .. contents::
  28. :local:
  29. Installation
  30. ============
  31. To install this module, you need to install Java JDK Headlees, e.g.:
  32. apt-get install openjdk-8-jre-headless
  33. Configuration
  34. =============
  35. In order to start signing PDF documents you need to configure certificate(s)
  36. to use in your company.
  37. * Go to ``Settings > Companies > Companies > Your company``
  38. * Go to ``Report configuration`` tab
  39. * Click ``Edit``
  40. * Add a new item in ``PDF report certificates`` list
  41. * Click ``Create``
  42. * Set name, certificate file, password file and model
  43. * Optionally you can set a domain and filename pattern for saving as attachment
  44. For example, if you want to sign only customer invoices in open or paid state:
  45. * Model: ``account.invoice``
  46. * Domain: ``[('type','=','out_invoice'), ('state', 'in', ('open', 'paid'))]``
  47. * Save as attachment: ``(object.number or '').replace('/','_') + '.signed.pdf'``
  48. **Note**: Linux user that executes Odoo server process must have
  49. read access to certificate file and password file
  50. Java Memory Settings
  51. ~~~~~~~~~~~~~~~~~~~~
  52. If you are signing large amounts of reports at the same time, or if you have a
  53. lower worker memory size than the JVM defaults, you may need to tune the JVM
  54. heap memory limits. Do so by adding a ``$JVM_ARGS`` environment variable that
  55. contains the required flags. Check out these links too:
  56. - `StackOverflow answer <https://stackoverflow.com/a/14763095/1468388>`_.
  57. - `Java docs <https://docs.oracle.com/cd/E15523_01/web.1111/e13814/jvm_tuning.htm#PERFM161>`_.
  58. Usage
  59. =====
  60. User just prints PDF documents (only Qweb PDF reports supported) as usual,
  61. but signed PDF is automatically downloaded if this document model is configured
  62. as indicated above.
  63. If 'Save as attachment' is configured, signed PDF is saved as attachment and
  64. next time saved one is downloaded without signing again. This is appropiate
  65. when signing date is important, for example, when signing customer invoices.
  66. You can try the signing with the demo report that is included for customers
  67. called "Test PDF certificate".
  68. Known issues / Roadmap
  69. ======================
  70. * When signing multiple documents (if 'Allow only one document' is disable)
  71. then 'Save as attachment' is not applied and signed result is not
  72. saved as attachment.
  73. * To have a visible signature through an image embedded in the resulting PDF.
  74. * Add tests.
  75. Bug Tracker
  76. ===========
  77. Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
  78. In case of trouble, please check there if your issue has already been reported.
  79. If you spotted it first, help us smashing it by providing a detailed and welcomed
  80. `feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_signer%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  81. Do not contact contributors directly about support or help with technical issues.
  82. Credits
  83. =======
  84. Authors
  85. ~~~~~~~
  86. * Tecnativa
  87. Contributors
  88. ~~~~~~~~~~~~
  89. * `Tecnativa <https://www.tecnativa.com>`_:
  90. * Rafael Blasco
  91. * Antonio Espinosa
  92. * Pedro M. Baeza
  93. * Jairo Llopis
  94. * David Vidal
  95. Other credits
  96. ~~~~~~~~~~~~~
  97. External utilities
  98. ++++++++++++++++++
  99. * iText v1.4.8: © 2000-2006, Paulo Soares, Bruno Lowagie and others - License `MPL <http://www.mozilla.org/MPL>`__ or `LGPL2 <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>`__ - http://sourceforge.net/projects/itext
  100. * jPdfSign: © 2006 Jan Peter Stotz - License `MPL <http://www.mozilla.org/MPL>`__ or `LGPL2 <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>`__ (inherited from iText) - http://private.sit.fraunhofer.de/~stotz/software/jpdfsign
  101. * Modified jPdfSign: © 2015 Antonio Espinosa - License `MPL <http://www.mozilla.org/MPL>`__ or `LGPL2 <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>`__ (inherited from iText) - static/src/java/JPdfSign.java
  102. Icon
  103. ++++
  104. `Created by Anton Noskov from the Noun Project <https://thenounproject.com/search/?q=signed+contract&i=65694>`__
  105. Maintainers
  106. ~~~~~~~~~~~
  107. This module is maintained by the OCA.
  108. .. image:: https://odoo-community.org/logo.png
  109. :alt: Odoo Community Association
  110. :target: https://odoo-community.org
  111. OCA, or the Odoo Community Association, is a nonprofit organization whose
  112. mission is to support the collaborative development of Odoo features and
  113. promote its widespread use.
  114. This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/12.0/report_qweb_signer>`_ project on GitHub.
  115. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.