From 720ff8a9e56117f027c064293a0ed1df4b6fc47b Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 2 Feb 2009 14:02:14 +0100 Subject: [PATCH] [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 --- bin/report/printscreen/ps_list.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/report/printscreen/ps_list.py b/bin/report/printscreen/ps_list.py index b59be30f1c8..d75d2ecad20 100644 --- a/bin/report/printscreen/ps_list.py +++ b/bin/report/printscreen/ps_list.py @@ -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])