Fix translation of empty value in selection

source must be compared to None instead of boolean.

issue2541
This commit is contained in:
Cédric Krier committed 2012-04-13 21:35:38 +02:00
1 parent dc98cd55d0
commit 71a76608c5
1 file changed
+2 -2
+2 -2
View File
@@ -328,7 +328,7 @@ class Translation(ModelSQL, ModelView, Cacheable):
return trans
cursor = Transaction().cursor
if source:
if source is not None:
cursor.execute('SELECT value '
'FROM ir_translation '
'WHERE lang = %s '
@@ -385,7 +385,7 @@ class Translation(ModelSQL, ModelView, Cacheable):
else:
res[(name, ttype, lang, source)] = None
self.add((lang, ttype, name, source), None)
if source:
if source is not None:
clause += [('(lang = %s ' \
'AND type = %s ' \
'AND name = %s ' \