[FIX]: stock: Fixed problem of wrong log message for consumed products

bzr revid: rpa@tinyerp.com-20100723134126-44lkag0fxm4euo3q
This commit is contained in:
rpa (Open ERP)
2010-07-23 19:11:26 +05:30
parent 6d83dde301
commit 9110935b2e
+4 -3
View File
@@ -2079,9 +2079,10 @@ class stock_move(osv.osv):
self.write(cr, uid, [move.id], update_val)
product_obj = self.pool.get('product.product')
for (id, name) in product_obj.name_get(cr, uid, [move.product_id.id]):
message = _('Product ') + " '" + name + "' "+ _("is consumed with") + " '" + str(move.product_qty) + "' "+ _("quantity.")
self.log(cr, uid, move.id, message)
for new_move in self.browse(cr, uid, res, context=context):
for (id, name) in product_obj.name_get(cr, uid, [new_move.product_id.id]):
message = _('Product ') + " '" + name + "' "+ _("is consumed with") + " '" + str(new_move.product_qty) + "' "+ _("quantity.")
self.log(cr, uid, new_move.id, message)
self.action_done(cr, uid, res)
return res