From a0fbfb6b48aa553b2fd16c865bb63494838ba5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 12 Feb 2015 10:48:19 +0100 Subject: [PATCH] locale.format doesn't accept None when formatting float This was introduced in changeset 21f958dabaf0 --- tryton/gui/window/view_form/view/list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index 7d8dfb564a..b1738684e7 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -1130,8 +1130,8 @@ class ViewTree(View): sum_ = common.timedelta.format(sum_, converter) else: selected_sum = locale.format( - '%.*f', (digit, selected_sum), True) - sum_ = locale.format('%.*f', (digit, sum_), True) + '%.*f', (digit, selected_sum or 0), True) + sum_ = locale.format('%.*f', (digit, sum_ or 0), True) text = '%s / %s' % (selected_sum, sum_) else: