[FIX]attachment without fname_attachment.

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

bzr revid: vja@vja-desktop-20120111125501-3jh2u9oyvt92ble9
This commit is contained in:
vishmita 2012-01-11 18:25:01 +05:30
parent f669d740b5
commit fb7d6b2111
1 changed files with 1 additions and 0 deletions

View File

@ -1257,6 +1257,7 @@ class Binary(openerpweb.Controller):
attachment_id = Model.create({
'name': ufile.filename,
'datas': base64.encodestring(ufile.read()),
'datas_fname': ufile.filename,
'res_model': model,
'res_id': int(id)
}, context)