minor fix

This commit is contained in:
Camilo Sarmiento 2020-07-16 09:56:32 -05:00
parent dedf2ac4bf
commit ae0f5eafe3
1 changed files with 1 additions and 1 deletions

View File

@ -600,7 +600,7 @@ class Payroll(Workflow, ModelSQL, ModelView):
if last_date_futhermore and last_date_futhermore > period.start:
return employee.contract
return
values = dict([(c.end_date, c) for c in contracts])
values = dict([(c.end_date or c.start_date, c) for c in contracts])
last_contract = values[max(values.keys())]