From 3c61ee5c68e3796bb29d2521123f2a867c9cc157 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 24 Apr 2015 15:44:26 +0200 Subject: [PATCH] [FIX] report: random disappearance of headers/footers This issue is related to the wkhtmltopdf issue https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2083 It seems there is a race condition in the Javascript file loading in wkhtmltopdf 0.12.x. The subst.js file put in the header/footer of reports was not always loaded when the page was being rendered, leading to the crash of the onload="subst()" attr in the body node, leading to the non-rendering of the header/footer. Replacing the script file by its content solves the issue. Increasing the --javascript-delay of the wkhtmltopdf executable (e.g. 1000 ms instead of 200 ms, the default value) seems to solve the problem as well, but will lead to obvious performance issues. We therefore choose to put the javascript code inline, as a workaround, the time the issue is solved in wkhtmltopdf, at least. closes #3047,#5548,#6207 opw-633161 --- addons/report/views/layouts.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/addons/report/views/layouts.xml b/addons/report/views/layouts.xml index 35af7d22770..c9bf8708185 100644 --- a/addons/report/views/layouts.xml +++ b/addons/report/views/layouts.xml @@ -152,7 +152,22 @@ - +