'Returns a local url that points to the image field of a given browse record.'

@api.model
def image_url(self, record, field, size=None):

    sudo_record = record.sudo()
    sha = hashlib.sha1(getattr(sudo_record, '__last_update')).hexdigest()[0:7]
    size = ('' if (size is None) else ('/%s' % size))
    return ('/web/image/%s/%s/%s%s?unique=%s' % (record._name, record.id, field, size, sha))
