[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user