mirror of https://github.com/OCA/social.git
[FIX] mass_mailing_partner: Don't match partner if no email
It doesn't make sense and even more, it crashed. Fixes #644pull/1326/head
parent
db5c37726e
commit
157ee5d0de
|
@ -6,7 +6,7 @@
|
|||
|
||||
{
|
||||
"name": "Link partners with mass-mailing",
|
||||
"version": "13.0.1.0.2",
|
||||
"version": "13.0.1.0.3",
|
||||
"author": "Tecnativa, " "Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/social",
|
||||
"license": "AGPL-3",
|
||||
|
|
|
@ -100,6 +100,8 @@ class MailingContact(models.Model):
|
|||
|
||||
def _set_partner(self):
|
||||
self.ensure_one()
|
||||
if not self.email:
|
||||
return
|
||||
m_partner = self.env["res.partner"]
|
||||
# Look for a partner with that email
|
||||
email = self.email.strip()
|
||||
|
|
Loading…
Reference in New Issue