From ae1d0c02a2eb7c90f9e2ce3fbf6e9ef30dff1ffe Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Tue, 15 May 2012 11:50:13 +0530 Subject: [PATCH] [IMP] improved code. bzr revid: tpa@tinyerp.com-20120515062013-nsg3g3kcgydpcj80 --- addons/crm_claim/crm_claim.py | 5 ++--- addons/crm_fundraising/crm_fundraising.py | 5 ++--- addons/crm_helpdesk/crm_helpdesk.py | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index bbb27b795bc..fa19af177a6 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -104,9 +104,8 @@ class crm_claim(crm.crm_case, osv.osv): return obj_id def create_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context)) - self.message_append_note(cr, uid, [id], body=msg, context=context) + msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, ids, context=context)) + self.message_append_note(cr, uid, ids, body=msg, context=context) return True def onchange_partner_id(self, cr, uid, ids, part, email=False): diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py index 53217fea73e..64c5b69b7bf 100644 --- a/addons/crm_fundraising/crm_fundraising.py +++ b/addons/crm_fundraising/crm_fundraising.py @@ -117,9 +117,8 @@ class crm_fundraising(crm.crm_case, osv.osv): return obj_id def create_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context)) - self.message_append_note(cr, uid, [id], body=msg, context=context) + msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, ids, context=context)) + self.message_append_note(cr, uid, ids, body=msg, context=context) return True diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index f43bdca82e1..840fb4423b9 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -101,9 +101,8 @@ class crm_helpdesk(crm.crm_case, osv.osv): return obj_id def create_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context)) - self.message_append_note(cr, uid, [id], body=msg, context=context) + msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, ids, context=context)) + self.message_append_note(cr, uid, ids, body=msg, context=context) return True def message_new(self, cr, uid, msg_dict, custom_values=None, context=None):