From 53929cceec2f07429e64a5d9d9bce75eb7c7eb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 30 Mar 2012 19:20:18 +0200 Subject: [PATCH] list_price is not always filled --- work.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work.py b/work.py index 735865903e..5c581044f2 100644 --- a/work.py +++ b/work.py @@ -103,7 +103,7 @@ class Work(ModelSQL, ModelView): if not work.children: leafs.add(work.id) - if work.type == 'task': + if work.type == 'task' and work.list_price: res[work.id] = work.list_price * Decimal(str(work.total_effort)) else: res[work.id] = Decimal('0')