From 97fb5968da8d8766ac01a228e070cf79697aee57 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Fri, 16 Mar 2012 17:10:11 +0530 Subject: [PATCH] [FIX] Remove for loop because it is for single record. bzr revid: bth@tinyerp.com-20120316114011-z2aolhndro7qhi44 --- addons/mrp/mrp.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 45241938264..cd20edb8517 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -542,33 +542,28 @@ class mrp_production(osv.osv): return True def action_cancel_send_note(self, cr, uid, ids, context=None): - for id in ids: - message = _("Manufacturing order has been canceled.") - self.message_append_note(cr, uid, [id], 'System Notification', message, context=context) + message = _("Manufacturing order has been canceled.") + self.message_append_note(cr, uid, ids, 'System Notification', message, context=context) return True def action_ready_send_note(self, cr, uid, ids, context=None): - for id in ids: - message = _("Manufacturing order is ready to produce.") - self.message_append_note(cr, uid, [id], 'System Notification', message, context=context) + message = _("Manufacturing order is ready to produce.") + self.message_append_note(cr, uid, ids, 'System Notification', message, context=context) return True def action_inproduction_send_note(self, cr, uid, ids, context=None): - for id in ids: - message = _("Manufacturing order is in production.") - self.message_append_note(cr, uid, [id], 'System Notification', message, context=context) + message = _("Manufacturing order is in production.") + self.message_append_note(cr, uid, ids, 'System Notification', message, context=context) return True def action_done_send_note(self, cr, uid, ids, context=None): - for id in ids: - message = _("Manufacturing order has been done.") - self.message_append_note(cr, uid, [id], 'System Notification', message, context=context) + message = _("Manufacturing order has been done.") + self.message_append_note(cr, uid, ids, 'System Notification', message, context=context) return True def action_waiting_send_note(self, cr, uid, ids, context=None): - for id in ids: - message = _("Manufacturing order has been confirmed and waiting for goods.") - self.message_append_note(cr, uid, [id], 'System Notification', message, context=context) + message = _("Manufacturing order has been confirmed and waiting for goods.") + self.message_append_note(cr, uid, ids, 'System Notification', message, context=context) return True def copy(self, cr, uid, id, default=None, context=None):