From 7f50f02183ad49584ef89627833e45cf4a4bc815 Mon Sep 17 00:00:00 2001 From: Priyanka Kakadiya Date: Wed, 20 Sep 2017 16:21:20 +0530 Subject: [PATCH] [FIX] stock: correct call to _run_wkhtmltopdf after b446930dc424 Otherwise printing the traceability report generates a traceback. --- addons/stock/models/stock_traceability.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock/models/stock_traceability.py b/addons/stock/models/stock_traceability.py index b6213ce76ac..96996c49fba 100644 --- a/addons/stock/models/stock_traceability.py +++ b/addons/stock/models/stock_traceability.py @@ -337,11 +337,11 @@ class MrpStockReport(models.TransientModel): header = self.env['ir.actions.report'].render_template("web.internal_layout", values=rcontext) header = self.env['ir.actions.report'].render_template("web.minimal_layout", values=dict(rcontext, subst=True, body=header)) - landscape = True return self.env['ir.actions.report']._run_wkhtmltopdf( - [self.env['ir.actions.report'].create_wkhtmltopdf_obj(header, body, None)], - landscape, self.env.user.company_id.paperformat_id, + [body], + header=header, + landscape=True, specific_paperformat_args={'data-report-margin-top': 10, 'data-report-header-spacing': 10} )