Fix get_cost_price when there is nothing in cost_prices

This commit is contained in:
Bertrand Chenal committed 2009-06-04 13:15:15 +02:00
1 parent 2235e3fcd1
commit ca00eceb9c
1 file changed
+1 -1
+1 -1
View File
@@ -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]: