[FIX] mail: set the thread_id when creating a new thread
After a refactoring for v11, the id of a newly created thread is not returned anymore. Therefore server actions weren't being executed on newly created records. opw 1886383 closes odoo/odoo#27238
This commit is contained in:
@@ -1211,6 +1211,7 @@ class MailThread(models.AbstractModel):
|
||||
# if a new thread is created, parent is irrelevant
|
||||
message_dict.pop('parent_id', None)
|
||||
thread = MessageModel.message_new(message_dict, custom_values)
|
||||
thread_id = thread.id
|
||||
else:
|
||||
if thread_id:
|
||||
raise ValueError("Posting a message without model should be with a null res_id, to create a private message.")
|
||||
|
||||
Reference in New Issue
Block a user