From 8f9489596bdafbd9ac87610f14ce6e9959e1362f Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Fri, 16 Mar 2012 18:22:57 +0530 Subject: [PATCH] [FIX] Remove For loop. bzr revid: bth@tinyerp.com-20120316125257-blyd6clm1m24rzbd --- addons/project/project.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index ca3f63d2513..102900ee9a9 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1050,33 +1050,28 @@ class task(osv.osv): return True def do_pending_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = 'Task is now pending.' - self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context) + msg = 'Task is now pending.' + self.message_append_note(cr, uid, ids, 'System Notification', msg, context=context) return True def do_open_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = 'Task has been opened.' - self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context) + msg = 'Task has been opened.' + self.message_append_note(cr, uid, ids, 'System Notification', msg, context=context) return True def do_cancel_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = 'Task has been canceled.' - self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context) + msg = 'Task has been canceled.' + self.message_append_note(cr, uid, ids, 'System Notification', msg, context=context) return True def do_close_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = 'Task has been closed.' - self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context) + msg = 'Task has been closed.' + self.message_append_note(cr, uid, ids, 'System Notification', msg, context=context) return True def do_draft_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = 'Task has been renewed.' - self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context) + msg = 'Task has been renewed.' + self.message_append_note(cr, uid, ids, 'System Notification', msg, context=context) return True def do_delegation_send_note(self, cr, uid, ids, context=None):