'Email tracking.'

@http.route('/mail/track/<int:mail_id>/blank.gif', type='http', auth='none')
def track_mail_open(self, mail_id, **post):

    request.env['mail.mail.statistics'].sudo().set_opened(mail_mail_ids=[mail_id])
    response = werkzeug.wrappers.Response()
    response.mimetype = 'image/gif'
    response.data = 'R0lGODlhAQABAIAAANvf7wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='.decode('base64')
    return response
