diff options
| author | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-08-29 12:56:33 +0530 |
|---|---|---|
| committer | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-08-29 12:56:33 +0530 |
| commit | 8a84afef994b08834f97e325ecbdf591dbbccb47 (patch) | |
| tree | 4d563f90dbdc5447ed976521826769ed1168f780 | |
| parent | 1325a350d5f21f3a2ee789d6bb1ee73d0dbb6210 (diff) | |
[IMP]:removed print and pass uid
bzr revid: apa@tinyerp.com-20120829072633-c13fg277j6be8182
| -rw-r--r-- | addons/mail/mail_thread.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 8c117065055..78b6dfac92c 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -1050,13 +1050,11 @@ class mail_thread(osv.Model): to_subscribe_uids = [uid] if user_ids is None else user_ids write_res = self.write(cr, uid, ids, {'message_follower_ids': self.message_subscribe_get_command(cr, uid, to_subscribe_uids, context)}, context=context) follower_ids = [follower.id for thread in self.browse(cr, uid, ids, context=context) for follower in thread.message_follower_ids] - print "self._name",self._name if not subtype_ids: subtype_obj = self.pool.get('mail.message.subtype') subtype_ids = subtype_obj.search(cr, uid, [('default', '=', 'true'),('model_ids.model', '=', self._name)]) - print "subtype_ids",subtype_ids if subtype_ids: - self.message_subscribe_udpate_subtypes(cr, uid, ids, user_ids, subtype_ids, context=context) + self.message_subscribe_udpate_subtypes(cr, uid, ids, to_subscribe_uids, subtype_ids, context=context) return follower_ids def message_subscribe_get_command(self, cr, uid, follower_ids, context=None): @@ -1202,7 +1200,7 @@ class mail_thread(osv.Model): def message_subscribe_udpate_subtypes(self, cr, uid, ids, user_id, subtype_ids,context=None): subscription_obj = self.pool.get('mail.followers') - subscription_ids = subscription_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids),('user_id','=',user_id)]) + subscription_ids = subscription_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids),('user_id','in',user_id)]) return subscription_obj.write(cr, uid, subscription_ids, {'subtype_ids': [(6, 0 , subtype_ids)]}, context = context) #overright or add new one def message_subscription_remove_subtype(self, cr, uid, ids, user_id, subtype_id): |
