You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
494 B
15 lines
494 B
# -*- coding: utf-8 -*-
|
|
# Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from openerp import api, models
|
|
|
|
|
|
class MailMail(models.Model):
|
|
_inherit = 'mail.mail'
|
|
|
|
@api.model
|
|
def _get_unsubscribe_url(self, mail, email_to):
|
|
result = super(MailMail, self)._get_unsubscribe_url(mail, email_to)
|
|
token = mail.mailing_id._unsubscribe_token(mail.res_id)
|
|
return "%s&token=%s" % (result, token)
|