From b4ba44316dcf31cd9cc12af20deb0024d3756e9d Mon Sep 17 00:00:00 2001 From: pvy Date: Mon, 31 Aug 2015 13:28:05 +0200 Subject: [PATCH] [FIX] report: save_in_attachment needs to be converted to an empty dictionnary if it's equal to none As _run_wkhtmltopdf() is also called in the account_reports module --- addons/report/models/report.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/report/models/report.py b/addons/report/models/report.py index 467e79be826..4a20045a5ca 100644 --- a/addons/report/models/report.py +++ b/addons/report/models/report.py @@ -330,6 +330,9 @@ class Report(osv.Model): :param save_in_attachment: dict of reports to save/load in/from the db :returns: Content of the pdf as a string """ + if not save_in_attachment: + save_in_attachment = {} + command_args = [] if set_viewport_size: command_args.extend(['--viewport-size', landscape and '1024x1280' or '1280x1024'])