diff options
| author | Thibault Delavallée <tde@openerp.com> | 2012-08-28 17:02:44 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2012-08-28 17:02:44 +0200 |
| commit | fe03a7f1ed21175bc1f6be2a0ff41cb8bce2191f (patch) | |
| tree | 0df8ea959fc3e607dbadb9b893cd325e9a8e6592 | |
| parent | a3fbc61638b5a877bac1c235c063710da1cbd77b (diff) | |
[FIX] mail_message: fixed _get_unread, because of an unitialized dict; mail_followers: fixed a wrong parameters order.
bzr revid: tde@openerp.com-20120828150244-vcpxj2nroc8esjzk
| -rw-r--r-- | addons/mail/mail_followers.py | 2 | ||||
| -rw-r--r-- | addons/mail/mail_message.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py index f54b2bd0317..409ed4a2f6f 100644 --- a/addons/mail/mail_followers.py +++ b/addons/mail/mail_followers.py @@ -77,7 +77,7 @@ class mail_notification(osv.Model): """ Override of create to check that we can not create a notification for a message the user can not read. """ if self.pool.get('mail.message').check_access_rights(cr, uid, 'read'): - return super(self, mail_notification).create(cr, uid, vals, context=context) + return super(mail_notification, self).create(cr, uid, vals, context=context) else: return False diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 5430e9b352c..1aa1c34568d 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -64,7 +64,7 @@ class mail_message(osv.Model): def _get_unread(self, cr, uid, ids, name, arg, context=None): """ Compute if the message is unread by the current user. """ - res = dict.fromkeys(ids, False) + res = dict((id, {'unread': False}) for id in ids) partner_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).partner_id.id notif_obj = self.pool.get('mail.notification') notif_ids = notif_obj.search(cr, uid, [ |
