Merge PR #3023 into 17.0

Signed-off-by pedrobaeza
pull/3027/head
OCA-git-bot 2024-08-29 10:21:54 +00:00
commit 4d1510aef7
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,9 @@ class Base(models.AbstractModel):
def _tm_post_message(self, data):
for model_name, model_data in data.items():
# check if record has mail.thread mixin
if not getattr(self.env[model_name], "message_post_with_source", False):
continue
for record_id, messages_by_field in model_data.items():
record = self.env[model_name].browse(record_id)
messages = [