[FIX] mail: fix method _get_default_author to return a recordset instead of an id

This commit is contained in:
Raphael Collet
2015-07-11 03:00:40 +02:00
parent 08e9fb84f6
commit b1915f506d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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')
+1 -1
View File
@@ -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':