[IMP] crm_phonecall: now has default inbox behavior for needaction_pending; project_task: updated needaction.

bzr revid: tde@openerp.com-20120627142552-zjkhc79ytlqrsp1i
This commit is contained in:
Thibault Delavallée
2012-06-27 16:25:52 +02:00
parent 4081379c91
commit 077de5e43d
2 changed files with 7 additions and 10 deletions
-8
View File
@@ -288,14 +288,6 @@ class crm_phonecall(base_state, osv.osv):
# ----------------------------------------
# OpenChatter
# ----------------------------------------
def get_needaction_user_ids(self, cr, uid, ids, context=None):
result = dict.fromkeys(ids)
for obj in self.browse(cr, uid, ids, context=context):
result[obj.id] = []
if (obj.state == 'draft' and obj.user_id):
result[obj.id] = [obj.user_id.id]
return result
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return 'Phonecall'
+7 -2
View File
@@ -1135,10 +1135,15 @@ class task(base_stage, osv.osv):
return 'Task'
def get_needaction_user_ids(self, cr, uid, ids, context=None):
result = dict.fromkeys(ids, [])
""" Returns the user_ids that have to perform an action
:return: dict { record_id: [user_ids], }
"""
result = super(project_task, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if obj.state == 'draft' and obj.user_id:
result[obj.id] = [obj.user_id.id]
result[obj.id].add(obj.user_id.id)
elif obj.state == 'draft':
result[obj.id].add(uid)
return result
def message_get_subscribers(self, cr, uid, ids, context=None):