From 7ad238b5f054f1afce7c5a5b6b43209fd671d850 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 24 Nov 2010 16:12:05 +0530 Subject: [PATCH] [FIX]: stock: action_confirm should not fill date_done on Physical Inventory bzr revid: rpa@tinyerp.com-20101124104205-0zde5r8e333uz09j --- addons/stock/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 299b81a9c01..eead1d13057 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2419,7 +2419,7 @@ class stock_inventory(osv.osv): move_obj = self.pool.get('stock.move') for inv in self.browse(cr, uid, ids, context=context): move_obj.action_done(cr, uid, [x.id for x in inv.move_ids], context=context) - self.write(cr, uid, [inv.id], {'state':'done'}, context=context) + self.write(cr, uid, [inv.id], {'state':'done', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context) return True def action_confirm(self, cr, uid, ids, context=None): @@ -2472,7 +2472,7 @@ class stock_inventory(osv.osv): move_ids.append(self._inventory_line_hook(cr, uid, line, value)) message = _('Inventory') + " '" + inv.name + "' "+ _("is done.") self.log(cr, uid, inv.id, message) - self.write(cr, uid, [inv.id], {'state': 'confirm', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S'), 'move_ids': [(6, 0, move_ids)]}) + self.write(cr, uid, [inv.id], {'state': 'confirm', 'move_ids': [(6, 0, move_ids)]}) return True def action_cancel(self, cr, uid, ids, context=None):