[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
This commit is contained in:
pvy
2015-08-31 13:37:09 +02:00
parent de1872b89d
commit b4ba44316d
+3
View File
@@ -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'])