From 5fce56cab36c661c2ed579cc56af64f74746eb83 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Fri, 1 Oct 2010 13:32:25 +0200 Subject: [PATCH] [FIX] report engine: fixed an error in 'get_digits' bzr revid: olt@tinyerp.com-20101001113225-wpmxc31htrj02ssf --- bin/report/report_sxw.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 542dc9ece25..2c505e98622 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -253,7 +253,11 @@ class rml_parse(object): if ids: d = decimal_precision_obj.browse(self.cr, self.uid, ids)[0].digits elif obj and f: - d = getattr(obj._columns[f], 'digits', lambda x: ((16,DEFAULT_DIGITS)))(self.cr)[1] + res_digits = getattr(obj._columns[f], 'digits', lambda x: ((16,DEFAULT_DIGITS))) + if isinstance(res_digits, tuple): + d = res_digits[1] + else: + d = res_digits(self.cr)[1] elif (hasattr(obj, '_field') and\ isinstance(obj._field, (float_class, function_class)) and\ obj._field.digits):