From a0484cbe45abb5dc393d3229ee1c6d24a4dfae23 Mon Sep 17 00:00:00 2001
From: Olivier Dony <odo@openerp.com>
Date: Thu, 5 May 2016 03:39:54 +0200
Subject: [PATCH] [FIX] import: broken translation cache for absent translation
 of 'false'

Backport of 7d732b1011f577b12a1c2aac9ef205e633ab8f61

Fixes #979
---
 openerp/addons/base/ir/ir_fields.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/openerp/addons/base/ir/ir_fields.py b/openerp/addons/base/ir/ir_fields.py
index f8a937304305..c34750c24f60 100644
--- a/openerp/addons/base/ir/ir_fields.py
+++ b/openerp/addons/base/ir/ir_fields.py
@@ -1,7 +1,6 @@
 # -*- coding: utf-8 -*-
 import datetime
 import functools
-import operator
 import itertools
 import time
 
@@ -246,7 +245,7 @@ class ir_fields_converter(orm.Model):
         tnx_ids = Translations.search(
             cr, uid, [('type', 'in', types), ('src', '=', src)], context=context)
         tnx = Translations.read(cr, uid, tnx_ids, ['value'], context=context)
-        result = tnx_cache[types][src] = map(operator.itemgetter('value'), tnx)
+        result = tnx_cache[types][src] = [t['value'] for t in tnx if t['value'] is not False]
         return result
 
     def _str_to_selection(self, cr, uid, model, column, value, context=None):
-- 
GitLab