[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:
Pedro M. Baeza 2020-12-04 08:33:59 +01:00 committed by emagdalenaC2i
parent 59bee287b3
commit fec2a394ad
2 changed files with 3 additions and 1 deletions

View File

@ -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",

View File

@ -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()