Browse Source

[9.0][FIX][mail_tracking] Control exception when mail_message was removed (#132)

pull/128/head
Antonio Espinosa 8 years ago
committed by Pedro M. Baeza
parent
commit
4b7e67513a
  1. 2
      mail_tracking/__openerp__.py
  2. 2
      mail_tracking/models/mail_tracking_email.py

2
mail_tracking/__openerp__.py

@ -5,7 +5,7 @@
{ {
"name": "Email tracking", "name": "Email tracking",
"summary": "Email tracking system for all mails sent", "summary": "Email tracking system for all mails sent",
"version": "9.0.3.0.0",
"version": "9.0.3.0.1",
"category": "Social Network", "category": "Social Network",
"website": "http://www.tecnativa.com", "website": "http://www.tecnativa.com",
"author": "Tecnativa, " "author": "Tecnativa, "

2
mail_tracking/models/mail_tracking_email.py

@ -224,6 +224,8 @@ class MailTrackingEmail(models.Model):
return email return email
def _message_partners_check(self, message, message_id): def _message_partners_check(self, message, message_id):
if not self.mail_message_id.exists(): # pragma: no cover
return True
mail_message = self.mail_message_id mail_message = self.mail_message_id
partners = ( partners = (
mail_message.needaction_partner_ids | mail_message.partner_ids) mail_message.needaction_partner_ids | mail_message.partner_ids)

Loading…
Cancel
Save