[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:
parent
f786f5537a
commit
360a1e50e3
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue