From 2254a970d426da5f23bddcb21eca58e7556e1742 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 9 Jul 2015 16:30:16 +0200 Subject: [PATCH] [FIX] report: use hardcoded viewport in wkhtmltopdf to use col-md-* Bootstrap Without this, wkhtmltopdf, don't use media query from bootstrap and so respect only col-xs-* class (xs by default because no media query). Viewport from wkhtmltopdf is not really respected, so 1024x768 or 1920x768 will not change the real view port, but only use the right media query. --- addons/report/models/report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/report/models/report.py b/addons/report/models/report.py index 11937235a77..261050d98a8 100644 --- a/addons/report/models/report.py +++ b/addons/report/models/report.py @@ -375,6 +375,8 @@ class Report(osv.Model): :returns: Content of the pdf as a string """ command_args = [] + if wkhtmltopdf_state == "ok": + command_args.extend(['--viewport-size', '1024x768']) # Passing the cookie to wkhtmltopdf in order to resolve internal links. try: