diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-12-11 15:45:51 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-12-11 15:45:51 +0100 |
| commit | f817cd3f3868823a9880fff420e0932a55bb8ff7 (patch) | |
| tree | cfdf5b40eef250830abb039ac62f2e4851c54a46 /addons/web/controllers/main.py | |
| parent | 5944b6c6d6f72109214fb7072e021906854d55ee (diff) | |
[IMP] web: move controler download_attachment into mail. change render into _t
bzr revid: chm@openerp.com-20121211144551-9uryi1z1sxe9daxv
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 38558b26e7c..4b23316e252 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1246,19 +1246,6 @@ class Binary(openerpweb.Controller): ('Content-Disposition', content_disposition(filename, req))]) @openerpweb.httprequest - def download_attachment(self, req, model, id, method, attachment_id, **kw): - Model = req.session.model(model) - res = getattr(Model, method)(int(id), int(attachment_id)) - if res: - filecontent = base64.b64decode(res.get('base64')) - filename = res.get('filename') - if filecontent and filename: - return req.make_response(filecontent, - headers=[('Content-Type', 'application/octet-stream'), - ('Content-Disposition', content_disposition(filename, req))]) - return req.not_found() - - @openerpweb.httprequest def saveas_ajax(self, req, data, token): jdata = simplejson.loads(data) model = jdata['model'] |
