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
791 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from openerp import models, api
  5. class MailMail(models.Model):
  6. _inherit = "mail.mail"
  7. @api.model
  8. def _tracking_email_prepare(self, mail, partner, email):
  9. res = super(MailMail, self)._tracking_email_prepare(
  10. mail, partner, email)
  11. res['mail_id_int'] = mail.id
  12. res['mass_mailing_id'] = mail.mailing_id.id
  13. res['mail_stats_id'] = mail.statistics_ids[:1].id \
  14. if mail.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