[IMP] website images: only checksum ir.attachment for empty urls
authorFabien Meghazi <fme@openerp.com>
Mon, 24 Mar 2014 15:14:47 +0000 (16:14 +0100)
committerFabien Meghazi <fme@openerp.com>
Mon, 24 Mar 2014 15:14:47 +0000 (16:14 +0100)
bzr revid: fme@openerp.com-20140324151447-a3mkncjh0b7k16hg

addons/website/models/website.py

index 1a54186..ca39c92 100644 (file)
@@ -574,7 +574,7 @@ class ir_attachment(osv.osv):
 
     def _compute_checksum(self, attachment_dict):
         if attachment_dict.get('res_model') == 'ir.ui.view'\
-                and not attachment_dict.get('res_id')\
+                and not attachment_dict.get('res_id') and not attachment_dict.get('url')\
                 and attachment_dict.get('type', 'binary') == 'binary'\
                 and attachment_dict.get('datas'):
             return hashlib.new('sha1', attachment_dict['datas']).hexdigest()