[FIX] Added a protection for module not having a needaction method defined.

bzr revid: tde@openerp.com-20120326094218-gb5xhi7r9d2qlcmh
This commit is contained in:
Thibault Delavallée
2012-03-26 11:42:18 +02:00
parent ac24b11e82
commit 43f75b4d80
+4 -1
View File
@@ -148,7 +148,10 @@ class mail_thread(osv.osv):
# parse message to get requested users
user_to_push_ids += self.message_parse_users(cr, uid, [msg_id], vals['body_text'], context=context)
# push to need_action_user_ids
user_to_push_ids += self.needaction_get_records_user_ids(cr, uid, [thread_id], context=context)
if hasattr(self, 'needaction_get_records_user_ids'):
user_to_push_ids += self.needaction_get_records_user_ids(cr, uid, [thread_id], context=context)
else:
user_to_push_ids = []
# remove duplicate entries
user_to_push_ids = list(set(user_to_push_ids))
# effectively push message to users