[FIX] Remove for loop because it is for single record.
authorBhumi Thakkar (Open ERP) <bth@tinyerp.com>
Fri, 16 Mar 2012 11:40:11 +0000 (17:10 +0530)
committerBhumi Thakkar (Open ERP) <bth@tinyerp.com>
Fri, 16 Mar 2012 11:40:11 +0000 (17:10 +0530)
bzr revid: bth@tinyerp.com-20120316114011-z2aolhndro7qhi44

addons/mrp/mrp.py

index 4524193..cd20edb 100644 (file)
@@ -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 <b>canceled</b>.")
-            self.message_append_note(cr, uid, [id], 'System Notification', message, context=context)
+        message = _("Manufacturing order has been <b>canceled</b>.")
+        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 <b>ready to produce</b>.")
-            self.message_append_note(cr, uid, [id], 'System Notification', message, context=context)
+        message = _("Manufacturing order is <b>ready to produce</b>.")
+        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 <b>in production</b>.")
-            self.message_append_note(cr, uid, [id], 'System Notification', message, context=context)
+        message = _("Manufacturing order is <b>in production</b>.")
+        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 <b>done</b>.")
-            self.message_append_note(cr, uid, [id], 'System Notification', message, context=context)
+        message = _("Manufacturing order has been <b>done</b>.")
+        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 <b>confirmed and waiting for goods</b>.")
-            self.message_append_note(cr, uid, [id], 'System Notification', message, context=context)
+        message = _("Manufacturing order has been <b>confirmed and waiting for goods</b>.")
+        self.message_append_note(cr, uid, ids, 'System Notification', message, context=context)
         return True
 
     def copy(self, cr, uid, id, default=None, context=None):