Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] crm: check if email_from is defined #1234

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/crm/models/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ def _message_partner_info_from_emails(self, emails, link_mail=False):
name_from_email = self.partner_name or self.contact_name
emails_normalized = tools.email_normalize_all(email)
email_normalized = emails_normalized[0] if emails_normalized else False
if email.lower() == self.email_from.lower() or (email_normalized and self.email_normalized == email_normalized):
if (email and self.email_from and email.lower() == self.email_from.lower()) or (email_normalized and self.email_normalized == email_normalized):
partner_info['full_name'] = tools.formataddr((
name_from_email,
','.join(emails_normalized) if emails_normalized else email))
Expand Down