[FIX] Fixed the issue of attachment file which can't open after save as

lp bug: https://launchpad.net/bugs/872707 fixed

bzr revid: tpa@tinyerp.com-20111014110942-9yk1cmeu8swtrcjj
This commit is contained in:
Turkesh Patel (Open ERP) 2011-10-14 16:39:42 +05:30
parent f786f5537a
commit 360a1e50e3
1 changed files with 1 additions and 1 deletions

View File

@ -1008,7 +1008,7 @@ class Binary(openerpweb.Controller):
Model = req.session.model(model)
context = req.session.eval_context(req.context)
res = Model.read([int(id)], [field, fieldname], context)[0]
filecontent = res.get(field, '')
filecontent = base64.b64decode(res.get(field, ''))
if not filecontent:
return req.not_found()
else: