Use email_filename if defined.

This commit is contained in:
MBSolutions 2018-01-08 16:11:07 +00:00
parent be2326754f
commit 4334c9c6b1
1 changed files with 1 additions and 0 deletions

View File

@ -396,6 +396,7 @@ class Template(ModelSQL, ModelView):
if value.get('reports'):
for report in value['reports']:
ext, data, filename, file_name = report[0:5]
filename = file_name or filename
filename = ext and '%s.%s' % (filename, ext) or filename
content_type, _ = mimetypes.guess_type(filename)
maintype, subtype = (