From 43f75b4d8052294382910de50ffd48cb2ff0e42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 26 Mar 2012 11:42:18 +0200 Subject: [PATCH] [FIX] Added a protection for module not having a needaction method defined. bzr revid: tde@openerp.com-20120326094218-gb5xhi7r9d2qlcmh --- addons/mail/mail_thread.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 3909150772a..b3b7666be85 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -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