[FIX] mail_thread: fixed search domain on message_unread that was buggy.
bzr revid: tde@openerp.com-20121205095020-932qhljgd5ll9nzb
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user