[IMP] mrp_repair: no need to rountrip via string to get today's datetime

bzr revid: xmo@openerp.com-20101005075948-1rq455369nr0rz6b
This commit is contained in:
Xavier Morel 2010-10-05 09:59:48 +02:00
parent 4988819428
commit f291106692
1 changed files with 1 additions and 1 deletions

View File

@ -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': {