Merge lp:~julie-w/unifield-web/UTP-1060 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4780
Proposed branch: lp:~julie-w/unifield-web/UTP-1060
Merge into: lp:unifield-web
Diff against target: 24 lines (+7/-1)
1 file modified
addons/openerp/controllers/actions.py (+7/-1)
To merge this branch: bzr merge lp:~julie-w/unifield-web/UTP-1060
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+287284@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/openerp/controllers/actions.py'
--- addons/openerp/controllers/actions.py 2016-01-21 17:24:12 +0000
+++ addons/openerp/controllers/actions.py 2016-02-26 10:05:26 +0000
@@ -35,6 +35,7 @@
35from tree import Tree35from tree import Tree
36from wizard import Wizard36from wizard import Wizard
37import urllib37import urllib
38import unicodedata
38import re39import re
39import os40import os
4041
@@ -225,7 +226,12 @@
225 cherrypy.response.headers['Content-Type'] = 'application/octet-stream'226 cherrypy.response.headers['Content-Type'] = 'application/octet-stream'
226 report_type = val['format']227 report_type = val['format']
227228
228 cherrypy.response.headers['Content-Disposition'] = '%sfilename="' % attachment + report_name.decode('utf-8') + '.' + report_type + '"'229 try:
230 report_name = report_name.decode('utf-8')
231 except UnicodeEncodeError:
232 # replace all compatibility characters with their equivalents ("e with accent" becomes "e"...)
233 report_name = unicodedata.normalize('NFKD', report_name).encode('ascii','ignore')
234 cherrypy.response.headers['Content-Disposition'] = '%sfilename="' % attachment + report_name + '.' + report_type + '"'
229235
230 return _print_data(val)236 return _print_data(val)
231237

Subscribers

People subscribed via source and target branches