Skip to content
Snippets Groups Projects
Commit cf3e517b authored by Fabien Meghazi's avatar Fabien Meghazi
Browse files

[FIX] website.image_url() access rights

parent 11d09707
No related branches found
No related tags found
No related merge requests found
......@@ -600,7 +600,7 @@ class website(osv.osv):
def image_url(self, cr, uid, record, field, size=None, context=None):
"""Returns a local url that points to the image field of a given browse record."""
model = record._name
id = '%s_%s' % (record.id, hashlib.sha1(record.write_date).hexdigest()[0:7])
id = '%s_%s' % (record.id, hashlib.sha1(record.sudo().write_date).hexdigest()[0:7])
size = '' if size is None else '-%s' % size
return '/website/image/%s-%s-%s%s' % (model, id, field, size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment