[FIX] Use the translation in the selection field for the print screen functionnality

lp bug: https://launchpad.net/bugs/323229 fixed

bzr revid: stephane@tinyerp.com-20090202130214-z3bknh0n2j0wpspa
This commit is contained in:
Stephane Wirtel 2009-02-02 14:02:14 +01:00
parent f04edba892
commit 720ff8a9e5
1 changed files with 7 additions and 0 deletions

View File

@ -156,8 +156,15 @@ class report_printscreen_list(report_int):
if fields[f]['type']=='many2one' and line[f]:
line[f]= line[f][1]
if fields[f]['type']=='selection' and line[f]:
for key, value in fields[f]['selection']:
if key == line[f]:
line[f] = value
break
if fields[f]['type'] in ('one2many','many2many') and line[f]:
line[f] = '( '+tools.ustr(len(line[f])) + ' )'
if fields[f]['type'] == 'float':
precision=(('digits' in fields[f]) and fields[f]['digits'][1]) or 2
line[f]='%.2f'%(line[f])