From 64aea2b515e9cb35890c1e674740b3f7d8df67f4 Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Wed, 25 May 2016 13:53:33 +0200 Subject: [PATCH] [FIX] base_import: currency symbol can be placed at the right of the value The previous code went outside of the list bounds because the modulo operator has a higher priority than the addition one. --- addons/base_import/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_import/models.py b/addons/base_import/models.py index b9452b18b83..4c4a9fd6c15 100644 --- a/addons/base_import/models.py +++ b/addons/base_import/models.py @@ -558,7 +558,7 @@ class ir_import(orm.TransientModel): # Check that currency exists currency = self.pool.get('res.currency').search(cr, uid, [('symbol', '=', split_value[currency_index].strip())]) if len(currency): - return split_value[currency_index+1%2] if not negative else '-'+split_value[currency_index+1%2] + return split_value[(currency_index+1)%2] if not negative else '-'+split_value[(currency_index+1)%2] # Otherwise it is not a float with a currency symbol return False