From 9110935b2e2d3b32ce4317fd95ec94afca14b51a Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Fri, 23 Jul 2010 19:11:26 +0530 Subject: [PATCH] [FIX]: stock: Fixed problem of wrong log message for consumed products bzr revid: rpa@tinyerp.com-20100723134126-44lkag0fxm4euo3q --- addons/stock/stock.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index bb5af627ebb..83f828203f6 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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