From 2db1b48bfcce6e246f4ba8610799c08b5eed5627 Mon Sep 17 00:00:00 2001 From: Dharmraj Jhala Date: Thu, 6 Sep 2018 17:08:09 +0530 Subject: [PATCH] [FIX] web: declare at the beginning of 'minimal_layout' The declaration must be the very first thing in an HTML document, otherwise you may experience that the preference is given to the "user agent stylesheet". This is the case while printing PDF reports using the 'minimal_layout' template. For example, layout for 'Picking Operation' report will be different in HTML and and PDF reports. Text inside will be aligned left in the HTML report, while center in the PDF one. The issue is there since a long time, but was not obvious enough to catch till now. (For example, in previous BS versions, explicit rule was present to align text to the left inside tag, and so the layout did not break by luck. BSv4 afterwards, this rule was removed, shedding light on this issue). This commit improves the behavior while printing PDF reports by placing declraration at the very beginning so that preference will be given to custom stylesheet over "user agent stylesheet". Task: 1880709 Closes #26846 --- addons/web/views/report_templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index bc84d62a065..0d86ea64167 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -99,8 +99,8 @@