[DOC] mail.thread: added some comments.

bzr revid: tde@openerp.com-20120702161306-az3en2qc1330yn2r
This commit is contained in:
Thibault Delavallée 2012-07-02 18:13:06 +02:00
parent b7f2854c59
commit 376014e00f
2 changed files with 8 additions and 5 deletions

View File

@ -24,5 +24,5 @@ mechanism [REF].
result = super(ir_needaction_mixin, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if obj.message_state == False and obj.user_id:
result[obj.id].add(obj.user_id.id)
result[obj.id].append(obj.user_id.id)
return result

View File

@ -22,15 +22,18 @@
from osv import osv
class ir_needaction_mixin(osv.Model):
""" Update of res.users class
- add a preference about sending emails about notificatoins
- make a new user follow itself
""" Update of ir.needaction_mixin class
- override the get_needaction_user_ids method to define the default
mail gateway need_action: when the object is unread, the object
responsible has an action to perform.
"""
_name = 'ir.needaction_mixin'
_inherit = ['ir.needaction_mixin']
def get_needaction_user_ids(self, cr, uid, ids, context=None):
""" Returns the user_ids that have to perform an action
""" Returns the user_ids that have to perform an action. It the
document mail state is unread (False), return object.user_id.id
as need_action uid.
:return: dict { record_id: [user_ids], }
"""
result = super(ir_needaction_mixin, self).get_needaction_user_ids(cr, uid, ids, context=context)