[FIX] orm: fixed compliancy with negative numeric ids

bzr revid: qdp-launchpad@tinyerp.com-20100825151818-oh1tv6pe6sw75yh1
This commit is contained in:
qdp-launchpad@tinyerp.com 2010-08-25 17:18:18 +02:00
parent 006a921f4d
commit 17a9b8f502
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ class browse_record(object):
raise KeyError('Field %s not found in %s'%(name,self))
# create browse records for 'remote' objects
for result_line in field_values:
if len(str(result_line['id']).split('-')) > 1:
if not isinstance(result_line['id'], (int, long)) and len(str(result_line['id']).split('-')) > 1:
result_line['id'] = int(str(result_line['id']).split('-')[0])
new_data = {}
for field_name, field_column in fields_to_fetch: