[FIX] GIF image is previewed
lp bug: https://launchpad.net/bugs/382352 fixed bzr revid: jvo@tinyerp.com-20090612114119-dh07bcgk8t46tc2s
This commit is contained in:
@@ -94,9 +94,10 @@ class ir_attachment(osv.osv):
|
||||
context['bin_size'] = False
|
||||
for i in self.browse(cr, uid, ids, context=context):
|
||||
result[i.id] = False
|
||||
for format in ('png','PNG','jpg','JPG'):
|
||||
if (i.datas_fname or '').endswith(format):
|
||||
for format in ('png','jpg','jpeg','gif','bmp'):
|
||||
if (i.datas_fname.lower() or '').endswith(format):
|
||||
result[i.id]= i.datas
|
||||
break
|
||||
return result
|
||||
|
||||
_name = 'ir.attachment'
|
||||
|
||||
Reference in New Issue
Block a user