|
| 1 | +======================= |
| 2 | +Qweb PDF reports signer |
| 3 | +======================= |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:cb6a141947d2443fb84ffb82d051635ec1add33f3249d9c48a3a65bfd961eb6e |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Beta |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/reporting-engine/tree/17.0/report_qweb_signer |
| 21 | + :alt: OCA/reporting-engine |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_qweb_signer |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module extends the functionality of report module to sign PDFs |
| 32 | +using a PKCS#12 certificate. |
| 33 | + |
| 34 | +**Table of contents** |
| 35 | + |
| 36 | +.. contents:: |
| 37 | + :local: |
| 38 | + |
| 39 | +Installation |
| 40 | +============ |
| 41 | + |
| 42 | +To install this module, you need to install Java JDK Headlees, e.g.: |
| 43 | + |
| 44 | + apt-get install default-jre-headless |
| 45 | + |
| 46 | +Configuration |
| 47 | +============= |
| 48 | + |
| 49 | +In order to start signing PDF documents you need to configure |
| 50 | +certificate(s) to use in your company. |
| 51 | + |
| 52 | +- Go to ``Settings > Companies > Companies > Your company`` |
| 53 | +- Go to ``Report configuration`` tab |
| 54 | +- Click ``Edit`` |
| 55 | +- Add a new item in ``PDF report certificates`` list |
| 56 | +- Click ``Create`` |
| 57 | +- Set name, certificate file, password file and model |
| 58 | +- Optionally you can set a domain and filename pattern for saving as |
| 59 | + attachment |
| 60 | + |
| 61 | +For example, if you want to sign only customer invoices in posted state: |
| 62 | + |
| 63 | +- Model: ``account.move`` |
| 64 | +- Domain: |
| 65 | + ``[('move_type','=','out_invoice'), ('state', '=', 'posted')]`` |
| 66 | +- Save as attachment: |
| 67 | + ``(object.name or '').replace('/','_') + '.signed.pdf'`` |
| 68 | + |
| 69 | +**Note**: Linux user that executes Odoo server process must have read |
| 70 | +access to certificate file and password file |
| 71 | + |
| 72 | +Java Memory Settings |
| 73 | +-------------------- |
| 74 | + |
| 75 | +If you are signing large amounts of reports at the same time, or if you |
| 76 | +have a lower worker memory size than the JVM defaults, you may need to |
| 77 | +tune the JVM heap memory limits. Do so by adding a ``$JVM_ARGS`` |
| 78 | +environment variable that contains the required flags. Check out these |
| 79 | +links too: |
| 80 | + |
| 81 | +- `StackOverflow |
| 82 | + answer <https://stackoverflow.com/a/14763095/1468388>`__. |
| 83 | +- `Java |
| 84 | + docs <https://docs.oracle.com/cd/E15523_01/web.1111/e13814/jvm_tuning.htm#PERFM161>`__. |
| 85 | + |
| 86 | +Usage |
| 87 | +===== |
| 88 | + |
| 89 | +User just prints PDF documents (only Qweb PDF reports supported) as |
| 90 | +usual, but signed PDF is automatically downloaded if this document model |
| 91 | +is configured as indicated above. |
| 92 | + |
| 93 | +If 'Save as attachment' is configured, signed PDF is saved as attachment |
| 94 | +and next time saved one is downloaded without signing again. This is |
| 95 | +appropiate when signing date is important, for example, when signing |
| 96 | +customer invoices. |
| 97 | + |
| 98 | +You can try the signing with the demo report that is included for |
| 99 | +customers called "Test PDF certificate". |
| 100 | + |
| 101 | +You can set extra parameters of JSignPdf library in the system parameter |
| 102 | +named 'reportqweb_signer.java_position_parameters', for example '-V' to |
| 103 | +visible signature into pdf. You can also set extra parameters for Java |
| 104 | +in the system parameter named 'reportqweb_signer.java_parameters'. |
| 105 | + |
| 106 | +Known issues / Roadmap |
| 107 | +====================== |
| 108 | + |
| 109 | +- When signing multiple documents (if 'Allow only one document' is |
| 110 | + disable) then 'Save as attachment' is not applied and signed result is |
| 111 | + not saved as attachment. |
| 112 | +- Add tests. |
| 113 | +- Why not taking the occasion to add the whole configuration at report |
| 114 | + level (if to be signed or not, the domain, etc...)? See |
| 115 | + https://github.com/OCA/reporting-engine/pull/533#issuecomment-898321161 |
| 116 | + |
| 117 | +Bug Tracker |
| 118 | +=========== |
| 119 | + |
| 120 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_. |
| 121 | +In case of trouble, please check there if your issue has already been reported. |
| 122 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 123 | +`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_signer%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 124 | + |
| 125 | +Do not contact contributors directly about support or help with technical issues. |
| 126 | + |
| 127 | +Credits |
| 128 | +======= |
| 129 | + |
| 130 | +Authors |
| 131 | +------- |
| 132 | + |
| 133 | +* Tecnativa |
| 134 | + |
| 135 | +Contributors |
| 136 | +------------ |
| 137 | + |
| 138 | +- `Tecnativa <https://www.tecnativa.com>`__: |
| 139 | + |
| 140 | + - Rafael Blasco |
| 141 | + - Antonio Espinosa |
| 142 | + - Pedro M. Baeza |
| 143 | + - Jairo Llopis |
| 144 | + - David Vidal |
| 145 | + |
| 146 | +- Santi Argüeso <santi@comunitea.com> |
| 147 | + |
| 148 | +- Omar Castiñeira <omar@comunitea.com> |
| 149 | + |
| 150 | +- `Punt Sistemes <https://www.puntsistemes.es>`__: |
| 151 | + |
| 152 | + - Isaac Gallart <igallart@puntsistemes.es> |
| 153 | + |
| 154 | +Other credits |
| 155 | +------------- |
| 156 | + |
| 157 | +External utilities |
| 158 | +~~~~~~~~~~~~~~~~~~ |
| 159 | + |
| 160 | +- JSignPdf: © Josef Cacek - License `MPL <http://www.mozilla.org/MPL>`__ |
| 161 | + or `LGPL2 <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>`__ |
| 162 | + - http://jsignpdf.sourceforge.net/ |
| 163 | + |
| 164 | +Icon |
| 165 | +~~~~ |
| 166 | + |
| 167 | +`Created by Anton Noskov from the Noun |
| 168 | +Project <https://thenounproject.com/search/?q=signed+contract&i=65694>`__ |
| 169 | + |
| 170 | +Maintainers |
| 171 | +----------- |
| 172 | + |
| 173 | +This module is maintained by the OCA. |
| 174 | + |
| 175 | +.. image:: https://odoo-community.org/logo.png |
| 176 | + :alt: Odoo Community Association |
| 177 | + :target: https://odoo-community.org |
| 178 | + |
| 179 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 180 | +mission is to support the collaborative development of Odoo features and |
| 181 | +promote its widespread use. |
| 182 | + |
| 183 | +This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/report_qweb_signer>`_ project on GitHub. |
| 184 | + |
| 185 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments