[IMP] remove log.
authorTurkesh Patel (Open ERP) <tpa@tinyerp.com>
Wed, 9 May 2012 05:46:21 +0000 (11:16 +0530)
committerTurkesh Patel (Open ERP) <tpa@tinyerp.com>
Wed, 9 May 2012 05:46:21 +0000 (11:16 +0530)
bzr revid: tpa@tinyerp.com-20120509054621-ukk52fya3yqmiuex

addons/mrp/procurement.py
addons/procurement/procurement.py

index 7418366..7b5c9ec 100644 (file)
@@ -43,7 +43,7 @@ class procurement_order(osv.osv):
             cr.execute('update procurement_order set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id))
             for (id, name) in self.name_get(cr, uid, procurement.id):
                 message = _("Procurement '%s' has an exception: 'No BoM defined for this product !'") % name
-                self.log(cr, uid, id, message)
+                self.message_append_note(cr, uid, [procurement], body=message, context=context)
             return False
         return True
     
index 4a77522..bc25985 100644 (file)
@@ -386,7 +386,8 @@ class procurement_order(osv.osv):
                     message = _("Not enough stock.")
 
                 if message:
-                    self.log(cr, uid, procurement.id, _("Procurement '%s' is in exception: ") % (procurement.name) + message)
+                    message = _("Procurement '%s' is in exception: ") % (procurement.name) + message
+                    self.message_append_note(cr, uid, [procurement], body=message, context=context)
                     cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
         return ok