summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-08-10 13:43:47 +0200
committerThibault Delavallée <tde@odoo.com>2018-08-10 13:43:47 +0200
commit1e7eb76c30c97390a3f71d79ce6bcfef49cceabc (patch)
treee3f9a9b98ada989c2d82fb89fb91e5edc79c6bbb /addons/mail/models/mail_thread.py
parent7499b47ffab0712e8a03655365b11450716e5717 (diff)
parentcf505c36985221819139ce30d7f03e6e51ec0298 (diff)
[MERGE][IMP] mail, mail_bot: improve Discuss onboarding and add your new best friend
Purpose of this merge is to improve onboarding of Discuss. This is done via a wow effect and a bot to test the Discuss app; otherwise you have nobody to talk to. Purpose is also to improve retention as "the best way to increase retention is this: when the user invites someone, when this guy activates its account, the user gets a push notification from the invited user that just logged in; that way he will come back to Odoo and start discussing with its colleagues. Concerning your new best friend: it is not a dog but Odoobot. See sub commits for more details. This merge is linked to task ID 1838588 and closes PR #25075.
Diffstat (limited to 'addons/mail/models/mail_thread.py')
-rw-r--r--addons/mail/models/mail_thread.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
index 1288f780d49..f086a3220a7 100644
--- a/addons/mail/models/mail_thread.py
+++ b/addons/mail/models/mail_thread.py
@@ -2030,7 +2030,11 @@ class MailThread(models.AbstractModel):
values.pop(x, None)
# Post the message
+ # canned_response_ids are added by js to be used by other computations (odoobot)
+ # we need to pop it from values since it is not stored on mail.message
+ canned_response_ids = values.pop('canned_response_ids', False)
new_message = MailMessage.create(values)
+ values['canned_response_ids'] = canned_response_ids
self._message_post_after_hook(new_message, values, model_description=model_description, mail_auto_delete=mail_auto_delete)
return new_message