[IMP] website images: only checksum ir.attachment for empty urls

bzr revid: fme@openerp.com-20140324151447-a3mkncjh0b7k16hg
This commit is contained in:
Fabien Meghazi 2014-03-24 16:14:47 +01:00
parent 5d107cfaa0
commit 9285813da9
1 changed files with 1 additions and 1 deletions

View 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()