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.

24 lines
824 B

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