diff --git a/mail_activity_portal/models/mail_thread.py b/mail_activity_portal/models/mail_thread.py index 5d0e6ee9..093ce87d 100644 --- a/mail_activity_portal/models/mail_thread.py +++ b/mail_activity_portal/models/mail_thread.py @@ -10,7 +10,7 @@ def message_post(self, **kwargs): """create activity from portal message""" msg = super().message_post(**kwargs) # Call method if from portal - if not self.env.context.get("allowed_company_ids"): + if "message_post_store" in self.env.context: self.schedule_email_activity() return msg