diff options
| author | Thibault Delavallée <tde@odoo.com> | 2021-04-21 11:57:13 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2021-04-23 08:00:43 +0000 |
| commit | 206685760abbc725765a1f4a5002c2a90abc0af8 (patch) | |
| tree | 38a8785fcbbb6f1e904b4b6a50b4de7e691b6fe0 /addons/crm | |
| parent | 681eb75aeab02b9f904f85a3c60abd7c4a3c5269 (diff) | |
[FW][FIX] mail, various: fix document access link computation
Purpose of this commit is to fix computation of access link. In some cases
msg_vals modification leads to invalid URL computation, notably for frontend
or backend differentiation for target recipients.
Followup of odoo/odoo#63292 .
Task ID-2513724
COM PR odoo/odoo#69607
ENT PR odoo/enterprise#17849
X-Original-Commit: odoo/odoo@2015ef463c9ac7c7f89d543745c02a2d1528acf2
Diffstat (limited to 'addons/crm')
| -rw-r--r-- | addons/crm/models/crm_lead.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 0856177c29e..37cdf2a0cb7 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -1401,21 +1401,21 @@ class Lead(models.Model): """ Handle salesman recipients that can convert leads into opportunities and set opportunities as won / lost. """ groups = super(Lead, self)._notify_get_groups(msg_vals=msg_vals) - msg_vals = msg_vals or {} + local_msg_vals = dict(msg_vals or {}) self.ensure_one() if self.type == 'lead': - convert_action = self._notify_get_action_link('controller', controller='/lead/convert', **msg_vals) + convert_action = self._notify_get_action_link('controller', controller='/lead/convert', **local_msg_vals) salesman_actions = [{'url': convert_action, 'title': _('Convert to opportunity')}] else: - won_action = self._notify_get_action_link('controller', controller='/lead/case_mark_won', **msg_vals) - lost_action = self._notify_get_action_link('controller', controller='/lead/case_mark_lost', **msg_vals) + won_action = self._notify_get_action_link('controller', controller='/lead/case_mark_won', **local_msg_vals) + lost_action = self._notify_get_action_link('controller', controller='/lead/case_mark_lost', **local_msg_vals) salesman_actions = [ {'url': won_action, 'title': _('Won')}, {'url': lost_action, 'title': _('Lost')}] if self.team_id: - custom_params = dict(msg_vals, res_id=self.team_id.id, model=self.team_id._name) + custom_params = dict(local_msg_vals, res_id=self.team_id.id, model=self.team_id._name) salesman_actions.append({ 'url': self._notify_get_action_link('view', **custom_params), 'title': _('Sales Team Settings') |
