From ca00eceb9c051d63b6e280e47ba7423f267bb7ea Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Thu, 4 Jun 2009 13:15:15 +0200 Subject: [PATCH] Fix get_cost_price when there is nothing in cost_prices --- service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.py b/service.py index fbf1532cc8..96924ead4f 100644 --- a/service.py +++ b/service.py @@ -54,7 +54,7 @@ class Employee(ModelSQL, ModelView, Cacheable): # compute the cost price for each employee at the given date res = {} for employee_id in ids: - if employee_id not in employee_costs: + if not employee_costs.get(employee_id): res[employee_id] = 0 continue if ctx_date < employee_costs[employee_id][0][0]: