[FIX]: stock: action_confirm should not fill date_done on Physical Inventory

bzr revid: rpa@tinyerp.com-20101124104205-0zde5r8e333uz09j
This commit is contained in:
rpa (Open ERP) 2010-11-24 16:12:05 +05:30
parent 1ac2c0d91c
commit 7ad238b5f0
1 changed files with 2 additions and 2 deletions

View File

@ -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):