From 2aefa41343be642ec7fb6cde37f4d11fc592fed0 Mon Sep 17 00:00:00 2001 From: "rha@tinyerp.com" <> Date: Thu, 16 Dec 2010 11:31:45 +0530 Subject: [PATCH] [Fix]: Bug #690234 mrp_repair: error if repair contains a product that its warranty is not multiple of 12 bzr revid: rha@tinyerp.com-20101216060145-pek6uv2pckkodlyt --- 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 0227de401d4..d35f4780699 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -222,7 +222,7 @@ class mrp_repair(osv.osv): if move_id: move = self.pool.get('stock.move').browse(cr, uid, move_id) product = self.pool.get('product.product').browse(cr, uid, prod_id) - limit = datetime.strptime(move.date_expected, '%Y-%m-%d %H:%M:%S') + relativedelta(months=product.warranty) + limit = datetime.strptime(move.date_expected, '%Y-%m-%d %H:%M:%S') + relativedelta(months=int(product.warranty)) data['value']['guarantee_limit'] = limit.strftime('%Y-%m-%d') data['value']['location_id'] = move.location_dest_id.id data['value']['location_dest_id'] = move.location_dest_id.id