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.

25 lines
851 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
  3. # Copyright 2017 Vicent Cubells - <vicent.cubells@tecnativa.com>
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. from openerp import models, api
  6. class MailMail(models.Model):
  7. _inherit = "mail.mail"
  8. @api.model
  9. def _tracking_email_prepare(self, partner, email):
  10. res = super(MailMail, self)._tracking_email_prepare(
  11. partner, email)
  12. res['mail_id_int'] = self.id
  13. res['mass_mailing_id'] = self.mailing_id.id
  14. res['mail_stats_id'] = self.statistics_ids[:1].id \
  15. if self.statistics_ids else False
  16. return res
  17. @api.model
  18. def _get_tracking_url(self, mail, partner=None):
  19. # Invalid this tracking image, we have other to do the same
  20. return False