diff --git a/mail_show_follower/models/mail_mail.py b/mail_show_follower/models/mail_mail.py index 845a7c4f31..9e06ab91b8 100644 --- a/mail_show_follower/models/mail_mail.py +++ b/mail_show_follower/models/mail_mail.py @@ -73,7 +73,9 @@ def _send(self, auto_commit=False, raise_exception=False, smtp_session=None): # recipients from any Notification Type (i.e. email, inbox, etc.) recipients = mail.notification_ids.res_partner_id record = self.env[mail.model].browse(mail.res_id) - company = getattr(record, "company_id", self.env.company) + company = getattr(record, "company_id", False) + if not company: + company = self.env.company show_internal_users = company and company.show_internal_users_cc show_in_cc_recipients = recipients._filter_shown_in_cc(show_internal_users) if len(show_in_cc_recipients) <= 1: