[MERGE] translate: avoid false positives during resolution of translation links

bzr revid: odo@openerp.com-20110117141803-st4zolrp5h6egpqw
This commit is contained in:
Vo Minh Thu (OpenERP)
2011-01-17 15:18:03 +01:00
committed by Olivier Dony
+6 -1
View File
@@ -919,7 +919,12 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
('src', '=', dic['src']),
]
if dic['type'] == 'model':
args.append(('res_id', '=', dic['res_id']))
if dic['res_id'] is False:
args.append(('res_id', '=', 0))
args.append(('module', '=', dic['module']))
args.append(('xml_id', '=', dic['xml_id']))
else:
args.append(('res_id', '=', dic['res_id']))
ids = trans_obj.search(cr, uid, args)
if ids:
if context.get('overwrite') and dic['value']: