From fa4e65df71ad1b87927438c040f34e634eb74604 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 7 Sep 2010 14:55:23 +0530 Subject: [PATCH] [Fix] stock :check the min_date bzr revid: sbh@tinyerp.com-20100907092523-tinv7e04un4hy09t --- addons/stock/stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 9596f3661a6..b17fadb8f33 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1260,6 +1260,7 @@ class stock_picking(osv.osv): @param ids: List of Picking Ids @param context: A standard dictionary for contextual values """ + msg='' for pick in self.browse(cr, uid, ids, context=context): type_list = { 'out':'Picking List', @@ -1268,8 +1269,10 @@ class stock_picking(osv.osv): 'delivery': 'Delivery order' } message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' " + if pick.min_date: + msg=datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d') + "'." state_list = { - 'confirmed': "is scheduled for the '" + datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d') + "'.", + 'confirmed': "is scheduled for the '" + msg , 'assigned': 'is ready to process.', 'cancel': 'is Cancelled.', 'done': 'is processed.',