diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 114d8f0842e..f0687a0dc08 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -1669,21 +1669,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') diff --git a/addons/hr_holidays/models/hr_leave.py b/addons/hr_holidays/models/hr_leave.py index 29508c37a0a..eb9936a4732 100644 --- a/addons/hr_holidays/models/hr_leave.py +++ b/addons/hr_holidays/models/hr_leave.py @@ -1221,15 +1221,15 @@ class HolidaysRequest(models.Model): """ Handle HR users and officers recipients that can validate or refuse holidays directly from email. """ groups = super(HolidaysRequest, self)._notify_get_groups(msg_vals=msg_vals) - msg_vals = msg_vals or {} + local_msg_vals = dict(msg_vals or {}) self.ensure_one() hr_actions = [] if self.state == 'confirm': - app_action = self._notify_get_action_link('controller', controller='/leave/validate', **msg_vals) + app_action = self._notify_get_action_link('controller', controller='/leave/validate', **local_msg_vals) hr_actions += [{'url': app_action, 'title': _('Approve')}] if self.state in ['confirm', 'validate', 'validate1']: - ref_action = self._notify_get_action_link('controller', controller='/leave/refuse', **msg_vals) + ref_action = self._notify_get_action_link('controller', controller='/leave/refuse', **local_msg_vals) hr_actions += [{'url': ref_action, 'title': _('Refuse')}] holiday_user_group_id = self.env.ref('hr_holidays.group_hr_holidays_user').id diff --git a/addons/hr_holidays/models/hr_leave_allocation.py b/addons/hr_holidays/models/hr_leave_allocation.py index b5e007efc98..8650f18310e 100644 --- a/addons/hr_holidays/models/hr_leave_allocation.py +++ b/addons/hr_holidays/models/hr_leave_allocation.py @@ -670,15 +670,15 @@ class HolidaysAllocation(models.Model): """ Handle HR users and officers recipients that can validate or refuse holidays directly from email. """ groups = super(HolidaysAllocation, self)._notify_get_groups(msg_vals=msg_vals) - msg_vals = msg_vals or {} + local_msg_vals = dict(msg_vals or {}) self.ensure_one() hr_actions = [] if self.state == 'confirm': - app_action = self._notify_get_action_link('controller', controller='/allocation/validate', **msg_vals) + app_action = self._notify_get_action_link('controller', controller='/allocation/validate', **local_msg_vals) hr_actions += [{'url': app_action, 'title': _('Approve')}] if self.state in ['confirm', 'validate', 'validate1']: - ref_action = self._notify_get_action_link('controller', controller='/allocation/refuse', **msg_vals) + ref_action = self._notify_get_action_link('controller', controller='/allocation/refuse', **local_msg_vals) hr_actions += [{'url': ref_action, 'title': _('Refuse')}] holiday_user_group_id = self.env.ref('hr_holidays.group_hr_holidays_user').id diff --git a/addons/portal/models/portal_mixin.py b/addons/portal/models/portal_mixin.py index 8b8b25f610f..d2e9e83f094 100644 --- a/addons/portal/models/portal_mixin.py +++ b/addons/portal/models/portal_mixin.py @@ -63,13 +63,13 @@ class PortalMixin(models.AbstractModel): def _notify_get_groups(self, msg_vals=None): access_token = self._portal_ensure_token() groups = super(PortalMixin, self)._notify_get_groups(msg_vals=msg_vals) - msg_vals = msg_vals or {} + local_msg_vals = dict(msg_vals or {}) if access_token and 'partner_id' in self._fields and self['partner_id']: customer = self['partner_id'] - msg_vals['access_token'] = self.access_token - msg_vals.update(customer.signup_get_auth_param()[customer.id]) - access_link = self._notify_get_action_link('view', **msg_vals) + local_msg_vals['access_token'] = self.access_token + local_msg_vals.update(customer.signup_get_auth_param()[customer.id]) + access_link = self._notify_get_action_link('view', **local_msg_vals) new_group = [ ('portal_customer', lambda pdata: pdata['id'] == customer.id, { diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 988d70842f6..05807fd78b1 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -1212,13 +1212,13 @@ class Task(models.Model): access button to portal users and portal customers. If they are notified they should probably have access to the document. """ groups = super(Task, self)._notify_get_groups(msg_vals=msg_vals) - msg_vals = msg_vals or {} + local_msg_vals = dict(msg_vals or {}) self.ensure_one() project_user_group_id = self.env.ref('project.group_project_user').id new_group = ('group_project_user', lambda pdata: pdata['type'] == 'user' and project_user_group_id in pdata['groups'], {}) if not self.user_id and not self.stage_id.fold: - take_action = self._notify_get_action_link('assign', **msg_vals) + take_action = self._notify_get_action_link('assign', **local_msg_vals) project_actions = [{'url': take_action, 'title': _('I take it')}] new_group[2]['actions'] = project_actions groups = [new_group] + groups