[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:
Jay (Open ERP)
2009-06-12 17:11:19 +05:30
parent 6dbb10e531
commit aed02eac4d
+3 -2
View File
@@ -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'