summaryrefslogtreecommitdiff
path: root/addons/crm/controllers
diff options
context:
space:
mode:
authorJérémy Hennecart <jeh@odoo.com>2020-07-06 15:42:35 +0000
committerThibault Delavallée <tde@odoo.com>2020-08-17 06:42:28 +0000
commita895cfcded2c50aa4992a8cb98ee6e9c2780d64c (patch)
tree3a3a69064f32891b9cac49e06da8d7e9322ea643 /addons/crm/controllers
parentdecfd753f968cbea8b2955562b7774e88ac7d637 (diff)
[IMP] crm: harmonize won triggers with rainbowman
PURPOSE Make sure the Rainbowman animation is rightly triggered whichever way the user marks the opportunity as won. Especially relevant for the onboarding as we want to show the first rainbowman to users completing the tour. SPECIFICATIONS Now the rainbowman and its finely-tuned message are displayed to the user when he uses the statusbar, mark lead as won using action buttons or drag and drop a lead in the won stage in kanban view. LINKS Task ID-2287758 PR #54553
Diffstat (limited to 'addons/crm/controllers')
-rw-r--r--addons/crm/controllers/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/crm/controllers/main.py b/addons/crm/controllers/main.py
index 4f1a6960645..f9d12a6c236 100644
--- a/addons/crm/controllers/main.py
+++ b/addons/crm/controllers/main.py
@@ -4,6 +4,7 @@ import logging
from odoo.addons.mail.controllers.main import MailController
from odoo import http
+from odoo.http import request
_logger = logging.getLogger(__name__)
@@ -15,7 +16,7 @@ class CrmController(http.Controller):
comparison, record, redirect = MailController._check_token_and_record_or_redirect('crm.lead', int(res_id), token)
if comparison and record:
try:
- record.action_set_won()
+ record.action_set_won_rainbowman()
except Exception:
_logger.exception("Could not mark crm.lead as won")
return MailController._redirect_to_messaging()