[FIX] web/report: fix header/footer css style in pdf reports (#19579)

After the refactoring of the wkhtmltopdf engine, the headers/footers are managed in a very different way to be able to call wkhtmltopdf only once. The subst JS function must select the right header/footer corresponding to the current page company. However, a <div> was suppressed during the process and then, some external customization might be ignored (see github issue for more details).

-issue: https://github.com/odoo/odoo/issues/19544
This commit is contained in:
Laurent Smet
2017-09-20 14:38:35 +02:00
committed by GitHub
parent 69161ed69c
commit 85a0399d4f
+10 -4
View File
@@ -114,11 +114,17 @@
var index = vars['webpage'].split('.', 4)[3]
var header = document.getElementById('minimal_layout_report_headers');
if(header != null)
header.innerHTML = header.children[index].innerHTML;
if(header !== null){
var companyHeader = header.children[index];
header.textContent = '';
header.appendChild(companyHeader);
}
var footer = document.getElementById('minimal_layout_report_footers');
if(footer != null)
footer.innerHTML = footer.children[index].innerHTML;
if(footer !== null){
var companyFooter = footer.children[index];
footer.textContent = '';
footer.appendChild(companyFooter);
}
}
</script>
</t>