Sanjay Gohel (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa-improve-notify-sgo 
into lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.

Requested reviews:
  Amit Patel (OpenERP) (apa-tiny)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-improve-notify-sgo/+merge/121134

hello sir,

    I have improved feeds notify to show only checked subtype.even in 
needacation user.

Thank You
Sanjay Gohel (sgo)
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-improve-notify-sgo/+merge/121134
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.
=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py	2012-08-24 05:03:32 +0000
+++ mail/mail_thread.py	2012-08-24 08:52:43 +0000
@@ -319,9 +319,11 @@
         subscr_ids = subscr_obj.search(cr, uid, ['&', ('res_model', '=', self._name), ('res_id', 'in', thread_ids)], context=context)
         notif_user_ids = []
         # check with subtype
+        is_subtype = False
         for subscription in subscr_obj.browse(cr, uid, subscr_ids, context=context):
             if subtype_id:
                 if subtype_id in [subtype.id for subtype in subscription.subtype_ids]:
+                    is_subtype = True
                     notif_user_ids.append(subscription.user_id.id)
             else:
                 notif_user_ids.append(subscription.user_id.id)
@@ -330,7 +332,8 @@
         if hasattr(self, 'get_needaction_user_ids') and self._columns.get('user_id'):
             user_ids_dict = self.get_needaction_user_ids(cr, uid, thread_ids, context=context)
             for id, user_ids in user_ids_dict.iteritems():
-                notif_user_ids += user_ids
+                if is_subtype:
+                    notif_user_ids += user_ids
         
         # add users notified of the parent messages (because: if parent message contains @login, login must receive the replies)
         if new_msg_vals.get('parent_id'):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to