From 3589c3f666c2448cf786378951b463cfc7c9c012 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 29 Nov 2016 11:33:30 +0100 Subject: [PATCH] [FIX] note: fix _notification_recipients Since revision 458aaca328491a993f7458520b047869a770325e, the `groups` args of the method `_notification_recipients` is a list of tuple, and no longer a dict. The code here has not been adapted to this change. It is now. opw-695300 --- addons/note/models/note.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/note/models/note.py b/addons/note/models/note.py index a12d8aee68f..279c377fc63 100644 --- a/addons/note/models/note.py +++ b/addons/note/models/note.py @@ -126,7 +126,9 @@ class Note(models.Model): groups = super(Note, self)._notification_recipients(message, groups) new_action_id = self.env['ir.model.data'].xmlid_to_res_id('note.action_note_note') new_action = self._notification_link_helper('new', action_id=new_action_id) - groups['user']['actions'] = [{'url': new_action, 'title': _('New Note')}] + for group, method, kwargs in groups: + if group == 'user': + kwargs.setdefault('actions', []).append({'url': new_action, 'title': _('New Note')}) return groups @api.multi