[FIX] mrp_repair: don't try to compare a date object with a datetime object
bzr revid: olt@tinyerp.com-20101004114819-0b8xhsjytfxgll8t
This commit is contained in:
parent
8e1b7362c9
commit
d51ad12b0c
|
@ -687,8 +687,9 @@ 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 date.today() > datetime.strptime(guarantee_limit, '%Y-%m-%d'):
|
||||
if guarantee_limit and datetime.strptime(date.today().strftime('%Y-%m-%d'), '%Y-%m-%d') > datetime.strptime(guarantee_limit, '%Y-%m-%d'):
|
||||
to_invoice=True
|
||||
|
||||
return {'value': {
|
||||
'to_invoice': to_invoice,
|
||||
'location_id': stock_id,
|
||||
|
|
Loading…
Reference in New Issue