From d51ad12b0c17318118198286a61d85c7813aa5aa Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 4 Oct 2010 13:48:19 +0200 Subject: [PATCH] [FIX] mrp_repair: don't try to compare a date object with a datetime object bzr revid: olt@tinyerp.com-20101004114819-0b8xhsjytfxgll8t --- addons/mrp_repair/mrp_repair.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index af88c32f42a..6cec29650f3 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -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,