From 0539dde57671c28c06a79022d98e8bf786d71695 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 3 Apr 2019 09:57:30 +0000 Subject: [PATCH] [FIX] point_of_sale: background layout header iframe When a report with header is displayed in iframe with layout "Background", part of the header maybe outside of the page. For example on /my/invoices portal show of an invoice, the max width report iframe can set at 210mm (+/- 793.7px normally), the header in background layout has `min-width: 900px` so is wrongly centered and may have content outside of shown page (eg. company tagline). The same issue happen when using HTML rendering of the report in backend, but depends on the viewport width. This may be the expected configuration when printing (wkhtmltopdf should unzoom if something was too large to fit) but not when displaying html directly. opw-1915807 closes #32373 Signed-off-by: Nicolas Lempereur (nle) --- addons/web/static/src/scss/layout_background.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/web/static/src/scss/layout_background.scss b/addons/web/static/src/scss/layout_background.scss index 9b137fde8c1..caeb1f0c2bf 100644 --- a/addons/web/static/src/scss/layout_background.scss +++ b/addons/web/static/src/scss/layout_background.scss @@ -82,3 +82,10 @@ } } } + +/* special case for displaying report in iframe */ +.o_in_iframe { + .o_background_header { + min-width: 0; + } +}