From f291106692e566de1e318e0807ae3e7128265d3c Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 5 Oct 2010 09:59:48 +0200 Subject: [PATCH] [IMP] mrp_repair: no need to rountrip via string to get today's datetime bzr revid: xmo@openerp.com-20101005075948-1rq455369nr0rz6b --- addons/mrp_repair/mrp_repair.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 6cec29650f3..010cb725c5c 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -687,7 +687,7 @@ class mrp_repair_line(osv.osv, ProductChangeMixin): if type == 'add': stock_id = self.pool.get('stock.location').search(cr, uid, [('name','=','Stock')])[0] to_invoice = False - if guarantee_limit and datetime.strptime(date.today().strftime('%Y-%m-%d'), '%Y-%m-%d') > datetime.strptime(guarantee_limit, '%Y-%m-%d'): + if guarantee_limit and datetime.now() > datetime.strptime(guarantee_limit, '%Y-%m-%d'): to_invoice=True return {'value': {