{"action":"closed","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/4482","labels_url":"https://api.github.com/repos/odoo/odoo/issues/4482/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/4482/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/4482/events","html_url":"https://github.com/odoo/odoo/issues/4482","id":53181140,"number":4482,"title":"report footer missing after restart, adding --javascript-delay to wkhtmltopdf fixes it [PATCH]","user":{"login":"gooofy","id":6418859,"avatar_url":"https://avatars.githubusercontent.com/u/6418859?v=3","gravatar_id":"","url":"https://api.github.com/users/gooofy","html_url":"https://github.com/gooofy","followers_url":"https://api.github.com/users/gooofy/followers","following_url":"https://api.github.com/users/gooofy/following{/other_user}","gists_url":"https://api.github.com/users/gooofy/gists{/gist_id}","starred_url":"https://api.github.com/users/gooofy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gooofy/subscriptions","organizations_url":"https://api.github.com/users/gooofy/orgs","repos_url":"https://api.github.com/users/gooofy/repos","events_url":"https://api.github.com/users/gooofy/events{/privacy}","received_events_url":"https://api.github.com/users/gooofy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-12-31T12:10:44Z","updated_at":"2015-01-06T17:24:44Z","closed_at":"2015-01-06T17:24:44Z","body":"Hi,\r\n\r\nwe noticed a pretty hard to trace problem with one of our custom qweb based reports: the report would sometimes be missing its footer, typically after a odoo restart but also at random times. after extensive debugging we discovered that specifying a larger javascript-delay in wkhtmltopdf seems to fix the problem permanently, see patch below.\r\n\r\nwould it make sense to add a system parameter in odoo to let users specify this delay in a permantent way so it would match their setup?\r\n\r\ndetails about our setup:\r\n\r\n- debian 7\r\n- wkhtmltopdf 0.12.1 (static build from wkhtmltopdf.org with patched qt)\r\n- odoo 8 stable build from dec 30th 2014\r\n- running behind apache https proxy setup\r\n\r\nproblem seems to be related to load times for javascript and css, in our case web base url points to https proxy so loading especially after apache restart can take a bit of time. in fact, we managed to reproduce the problem by restarting apache proxy alone.\r\n\r\n```javascript\r\n--- report/models/report.py     2014-12-31 13:00:11.750661235 +0100\r\n+++ /opt/odoo/openerp_old/openerp/addons/report/models/report.py        2014-11-23 16:22:52.000000000 +0100\r\n@@ -439,16 +439,12 @@\r\n                 content_file.write(reporthtml[1])\r\n \r\n             try:\r\n-                wkhtmltopdf = [_get_wkhtmltopdf_bin()] + ['--javascript-delay', '5000'] + command_args + local_command_args\r\n+                wkhtmltopdf = [_get_wkhtmltopdf_bin()] + command_args + local_command_args\r\n                 wkhtmltopdf += [content_file_path] + [pdfreport_path]\r\n \r\n                 process = subprocess.Popen(wkhtmltopdf, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\r\n                 out, err = process.communicate()\r\n ```\r\n"}}