[MERGE] better filename for reports

bzr revid: fp@tinyerp.com-20120920093457-dy4t9nhygka5ngmz
This commit is contained in:
Fabien Pinckaers 2012-09-20 11:34:57 +02:00
commit cac8884c6c
1 changed files with 1 additions and 1 deletions

View File

@ -1922,7 +1922,7 @@ class Reports(View):
report = zlib.decompress(report)
report_mimetype = self.TYPES_MAPPING.get(
report_struct['format'], 'octet-stream')
file_name = None
file_name = action.get('name', 'report')
if 'name' not in action:
reports = req.session.model('ir.actions.report.xml')
res_id = reports.search([('report_name', '=', action['report_name']),],