[FIX] note: fix _notification_recipients

Since revision 458aaca328,
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
This commit is contained in:
Denis Ledoux
2016-11-29 11:35:13 +01:00
parent 060d6927c9
commit 3589c3f666
+3 -1
View File
@@ -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