Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-50584-msh into
lp:openobject-client-web/6.0.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-50584-msh/+merge/82816
Hello,
Fixed the issue of file download from sidebar which has Non-ASCII Characters.
Demo : Attach file with the record from the sidebar which has Non-ASCII
characters(e.g. "优酷取回密码信息.eml")
Now after attaching click on that, you will find that file name will be "get"
instead of "优酷取回密码信息.eml".
Reason : Mozilla and chrome are not able to recongnize the Non-ASCII characters.
Changed the code and converted cherrypy.response.headers["Content-Disposition"]
to utf-8.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-50584-msh/+merge/82816
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-50584-msh.
=== modified file 'addons/openerp/controllers/attachment.py'
--- addons/openerp/controllers/attachment.py 2011-01-17 11:57:11 +0000
+++ addons/openerp/controllers/attachment.py 2011-11-20 10:44:24 +0000
@@ -59,7 +59,7 @@
attachment = rpc.RPCProxy('ir.attachment').read(record, [], rpc.session.context)
if attachment['type'] == 'binary':
- cherrypy.response.headers["Content-Disposition"] = 'attachment; filename="%s"' % attachment['name']
+ cherrypy.response.headers["Content-Disposition"] = 'attachment; filename="%s"' % attachment['name'].encode('utf-8')
return base64.decodestring(attachment['datas'])
elif attachment['type'] == 'url':
raise redirect(attachment['url'])
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp