diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index faa4bb1c9b4..1824f59e0b9 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -132,8 +132,7 @@ class mail_group(osv.Model): params = { 'search_view_id': search_ref and search_ref[1] or False, 'domain': [('model','=','mail.group'),('res_id','=',mail_group_id)], - 'res_model': 'mail.group', - 'res_id': mail_group_id, + 'res_model': 'mail.message', 'thread_level': 2 } cobj = self.pool.get('ir.actions.client') diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index b74df2f8594..b9cb0723a4f 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -109,6 +109,13 @@ class mail_message(osv.Model): 'body': fields.html('Content'), } + def _needaction_domain_get(self, cr, uid, context={}): + if self._needaction: + partner_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).partner_id.id + return [('notification_ids.partner_id','=',partner_id),('notification_ids.read','=',False)] + return [] + + def _get_default_author(self, cr, uid, context={}): return self.pool.get('res.users').browse(cr, uid, uid, context=context).partner_id.id