[FIX] mail: fix method _get_default_author to return a recordset instead of an id
This commit is contained in:
@@ -47,7 +47,7 @@ class Message(models.Model):
|
||||
|
||||
@api.model
|
||||
def _get_default_author(self):
|
||||
return self.env.user.partner_id.id
|
||||
return self.env.user.partner_id
|
||||
|
||||
# content
|
||||
subject = fields.Char('Subject')
|
||||
|
||||
@@ -1467,7 +1467,7 @@ class MailThread(models.AbstractModel):
|
||||
# 0: Find the message's author, because we need it for private discussion
|
||||
author_id = kwargs.get('author_id')
|
||||
if author_id is None: # keep False values
|
||||
author_id = self.env['mail.message']._get_default_author()
|
||||
author_id = self.env['mail.message']._get_default_author().id
|
||||
|
||||
# 1: Handle content subtype: if plaintext, converto into HTML
|
||||
if content_subtype == 'plaintext':
|
||||
|
||||
Reference in New Issue
Block a user