summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2016-06-14 13:26:30 +0200
committerGoffin Simon <sig@odoo.com>2016-06-14 14:44:58 +0200
commitca8a38d201643f0be1149fc37f87c6dd93f363ff (patch)
tree1c4c8c3d37be075e4e79fd17672427fb6b1fa997 /addons/mail/models/mail_thread.py
parent3f16ddfe503e36c9df63e4186c0674ccb61e7097 (diff)
[FIX] mail: forum reply shows as 'False'
When posting a comment after an answer in the forum, a mail was sent to each subscriber with 'Re: False' as title. In fact the title has to be 'Re:' + the name of the parent record of this message. When a mail is sent from the post, a link to access the subject of the forum must be included in the mail. opw:679073
Diffstat (limited to 'addons/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index a09e41af0b6..353db634554 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -1814,6 +1814,9 @@ class MailThread(models.AbstractModel):
for x in ('from', 'to', 'cc'):
values.pop(x, None)
+ if not values['subject'] and self._name == 'forum.post':
+ values['record_name'] = self.parent_id and self.parent_id.name
+
# Post the message
new_message = MailMessage.create(values)