[FIX] import: broken translation cache for absent translation of 'false'
Backport of 7d732b1011
Fixes #979
This commit is contained in:
parent
7cafe6a9c1
commit
a0484cbe45
|
@ -1,7 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import datetime
|
import datetime
|
||||||
import functools
|
import functools
|
||||||
import operator
|
|
||||||
import itertools
|
import itertools
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -246,7 +245,7 @@ class ir_fields_converter(orm.Model):
|
||||||
tnx_ids = Translations.search(
|
tnx_ids = Translations.search(
|
||||||
cr, uid, [('type', 'in', types), ('src', '=', src)], context=context)
|
cr, uid, [('type', 'in', types), ('src', '=', src)], context=context)
|
||||||
tnx = Translations.read(cr, uid, tnx_ids, ['value'], 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
|
return result
|
||||||
|
|
||||||
def _str_to_selection(self, cr, uid, model, column, value, context=None):
|
def _str_to_selection(self, cr, uid, model, column, value, context=None):
|
||||||
|
|
Loading…
Reference in New Issue