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.

128 lines
4.5 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. =======================
  5. Qweb PDF reports signer
  6. =======================
  7. This module extends the functionality of report module to sign
  8. PDFs using a PKCS#12 certificate.
  9. Installation
  10. ============
  11. To install this module, you need to install Java JDK::
  12. apt-get install openjdk-7-jre-headless
  13. Configuration
  14. =============
  15. In order to start signing PDF documents you need to configure certificate(s)
  16. to use in your company.
  17. * Go to ``Settings > Companies > Companies > Your company``
  18. * Go to ``Report configuration`` tab
  19. * Click ``Edit``
  20. * Add a new item in ``PDF report certificates`` list
  21. * Click ``Create``
  22. * Set name, certificate file, password file and model
  23. * Optionally you can set a domain and filename pattern for saving as attachment
  24. For example, if you want to sign only customer invoices in open or paid state:
  25. * Model: ``account.invoice``
  26. * Domain: ``[('type','=','out_invoice'), ('state', 'in', ('open', 'paid'))]``
  27. * Save as attachment: ``(object.number or '').replace('/','_') + '.signed.pdf'``
  28. **Note**: Linux user that executes Odoo server process must have
  29. read access to certificate file and password file
  30. Java Memory Settings
  31. --------------------
  32. If you are signing large amounts of reports at the same time, or if you have a
  33. lower worker memory size than the JVM defaults, you may need to tune the JVM
  34. heap memory limits. Do so by adding a ``$JVM_ARGS`` environment variable that
  35. contains the required flags. Check out these links too:
  36. - `StackOverflow answer <https://stackoverflow.com/a/14763095/1468388>`_.
  37. - `Java docs <https://docs.oracle.com/cd/E15523_01/web.1111/e13814/jvm_tuning.htm#PERFM161>`_.
  38. Usage
  39. =====
  40. User just prints PDF documents (only Qweb PDF reports supported) as usual,
  41. but signed PDF is automatically downloaded if this document model is configured
  42. as indicated above.
  43. If 'Save as attachment' is configured, signed PDF is saved as attachment and
  44. next time saved one is downloaded without signing again. This is appropiate
  45. when signing date is important, for example, when signing customer invoices.
  46. You can try the signing with the demo report that is included for customers
  47. called "Test PDF certificate".
  48. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  49. :alt: Try me on Runbot
  50. :target: https://runbot.odoo-community.org/runbot/143/10.0
  51. Known issues / Roadmap
  52. ======================
  53. * When signing multiple documents (if 'Allow only one document' is disable)
  54. then 'Save as attachment' is not applied and signed result is not
  55. saved as attachment.
  56. * To have a visible signature through an image embedded in the resulting PDF.
  57. * Add tests.
  58. Bug Tracker
  59. ===========
  60. Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
  61. In case of trouble, please check there if your issue has already been reported.
  62. If you spotted it first, help us smashing it by providing a detailed and
  63. welcomed feedback `here <https://github.com/OCA/reporting-engine/issues/new>`_.
  64. Credits
  65. =======
  66. External utilities
  67. ------------------
  68. * 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
  69. * 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
  70. * 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
  71. Icon
  72. ----
  73. `Created by Anton Noskov from the Noun Project <https://thenounproject.com/search/?q=signed+contract&i=65694>`_
  74. Contributors
  75. ------------
  76. * Rafael Blasco <rafael.blasco@tecnativa.com>
  77. * Antonio Espinosa <antonio.espinosa@tecnativa.com>
  78. * Pedro M. Baeza <pedro.baeza@tecnativa.com>
  79. * Jairo Llopis <jairo.llopis@tecnativa.com>
  80. Maintainer
  81. ----------
  82. .. image:: https://odoo-community.org/logo.png
  83. :alt: Odoo Community Association
  84. :target: https://odoo-community.org
  85. This module is maintained by the OCA.
  86. OCA, or the Odoo Community Association, is a nonprofit organization whose
  87. mission is to support the collaborative development of Odoo features and
  88. promote its widespread use.
  89. To contribute to this module, please visit https://odoo-community.org.