diff --git a/addons/stock/stock.py b/addons/stock/stock.py index bcc3e22f791..b58eca5ccb9 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -884,7 +884,13 @@ class stock_picking(osv.osv): This method is called at the end of the workflow by the activity "done". @return: True """ - self.write(cr, uid, ids, {'state': 'done', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S')}) + for picking in self.browse(cr, uid, ids, context=context): + values = { + 'state': 'done' + } + if not picking.date_done: + values['date_done'] = time.strftime(DEFAULT_SERVER_DATETIME_FORMAT) + self.write(cr, uid, ids, values, context=context) return True def action_move(self, cr, uid, ids, context=None):