[FIX] mass_mailing_partner: Don't match partner if no email
It doesn't make sense and even more, it crashed. Fixes #644
This commit is contained in:
parent
59bee287b3
commit
fec2a394ad
@ -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
Block a user