Improve convertion of id into xml id for translation export

This commit is contained in:
Cédric Krier committed 2009-05-03 14:04:02 +02:00
1 parent 2343b6dec7
commit dcc287a294
1 file changed
+4 -7
+4 -7
View File
@@ -1,4 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms.
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
"Translation"
import base64
try:
@@ -511,12 +512,8 @@ class Translation(ModelSQL, ModelView, Cacheable):
model = translation.name.split(',')[0]
if model in db_id2fs_id:
res_id = db_id2fs_id[model].get(res_id)
try:
val = int(res_id)
if val != 0:
continue
except (ValueError, TypeError):
pass
else:
break
row.append(res_id)
elif field == 'fuzzy':
row.append(int(translation[field]))