[FIX] mail_thread: fixed search domain on message_unread that was buggy.

bzr revid: tde@openerp.com-20121205095020-932qhljgd5ll9nzb
This commit is contained in:
Thibault Delavallée
2012-12-05 10:50:20 +01:00
parent 875baa1646
commit 3bb1475f6e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ class mail_message(osv.Model):
# protection for `default_type` values leaking from menu action context (e.g. for invoices)
if context and context.get('default_type') and context.get('default_type') not in self._columns['type'].selection:
context = dict(context, default_type=None)
return super(mail_message, self).default_get(cr, uid, fields, context=context)
return super(mail_message, self).default_get(cr, uid, fields, context=context)
def _shorten_name(self, name):
if len(name) <= (self._message_record_name_length + 3):
+1 -1
View File
@@ -122,7 +122,7 @@ class mail_thread(osv.AbstractModel):
return res
def _search_unread(self, cr, uid, obj=None, name=None, domain=None, context=None):
return ['&', ('message_ids.model', '=', self._name), ('message_ids.notification_ids.to_read', '=', False)]
return [('message_ids.to_read', '=', False)]
def _get_followers(self, cr, uid, ids, name, arg, context=None):
fol_obj = self.pool.get('mail.followers')