From 10276def37afdf5af8760894ec8e7776ee5794ba Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Fri, 17 Nov 2017 13:21:29 +0100 Subject: [PATCH] [FIX] report_qweb_signer: Remove hardcoded memory limits These limits were being hit when printing PDF reports with just 80 pages. --- report_qweb_signer/README.rst | 11 +++++++++++ report_qweb_signer/__manifest__.py | 2 +- report_qweb_signer/models/report.py | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/report_qweb_signer/README.rst b/report_qweb_signer/README.rst index bd69d6b5..0f676dfe 100644 --- a/report_qweb_signer/README.rst +++ b/report_qweb_signer/README.rst @@ -41,6 +41,16 @@ For example, if you want to sign only customer invoices in open or paid state: **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: + +- `StackOverflow answer `_. +- `Java docs `_. Usage ===== @@ -100,6 +110,7 @@ Contributors * Rafael Blasco * Antonio Espinosa * Pedro M. Baeza +* Jairo Llopis Maintainer ---------- diff --git a/report_qweb_signer/__manifest__.py b/report_qweb_signer/__manifest__.py index 246892ba..50fcaf4e 100644 --- a/report_qweb_signer/__manifest__.py +++ b/report_qweb_signer/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Qweb PDF reports signer", "summary": "Sign Qweb PDFs usign a PKCS#12 certificate", - "version": "10.0.1.0.0", + "version": "10.0.1.0.1", "category": "Reporting", "website": "https://www.tecnativa.com", "author": "Tecnativa, " diff --git a/report_qweb_signer/models/report.py b/report_qweb_signer/models/report.py index e990bbb0..593c36de 100644 --- a/report_qweb_signer/models/report.py +++ b/report_qweb_signer/models/report.py @@ -108,7 +108,7 @@ class Report(models.Model): def _signer_bin(self, opts): me = os.path.dirname(__file__) - java_bin = 'java -jar -Xms4M -Xmx4M' + java_bin = 'java -jar' jar = '{}/../static/jar/jPdfSign.jar'.format(me) return '%s %s %s' % (java_bin, jar, opts)