From 9fadd925cb0e206d49fc4132aad7c0e5ce1c5c42 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 8 Mar 2021 06:53:43 +0000 Subject: [PATCH] [FIX] reporting: fix rendering during PDF printing The process of making HTML reports palatable to wkhtmltopdf is a bit involved, including various renderings intersperded with processing. This means bits of HTML are created, which are processed (via lxml) before being fed into further templates. On step 3, the previously processed bits need to be marked as Markup lest they be escaped again and lead to... odd results. Also explicitly provide encoding for one case where it's not entirely necessary but can't hurt. Also un-escape in report templates, it seems completely unnecessary. And try to move it to the correct location to the extent that that's possible: per-spec, it should be in the head, not outside the document entirely. --- .../stock/views/report_stock_traceability.xml | 8 +++++-- addons/web/views/report_templates.xml | 2 +- odoo/addons/base/models/ir_actions_report.py | 22 +++++++++++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/addons/stock/views/report_stock_traceability.xml b/addons/stock/views/report_stock_traceability.xml index 7b4513a1acf..04557120a76 100644 --- a/addons/stock/views/report_stock_traceability.xml +++ b/addons/stock/views/report_stock_traceability.xml @@ -76,9 +76,13 @@ diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index 8b25907506c..31690ad2d2e 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -239,9 +239,9 @@