diff --git a/trytond/report/report.py b/trytond/report/report.py index 773d76a5d2..7614fbf353 100644 --- a/trytond/report/report.py +++ b/trytond/report/report.py @@ -191,7 +191,8 @@ class Report(object): if file.startswith('Pictures'): picture = style2_z.read(file) pictures.append((file, picture)) - manifest.add_file_entry(file) + if manifest: + manifest.add_file_entry(file) style2_z.close() style2_io.close() dom_style2 = xml.dom.minidom.parseString(style2_xml)