Commit 56da7fe4 authored by Santiago Apel's avatar Santiago Apel 💬
Browse files

[IMP] last_contract filtered by active

parent 2298ee1b
......@@ -9,7 +9,7 @@ class HREmployee(models.Model):
def _get_vigent_contract(self):
for record in self:
contract_ids = self.env["hr.contract"].search(
['&',("employee_id", "=", record.id),('state','=','open')],
[("employee_id", "=", record.id),('state','=','open'),('active','=',True)],
order="date_start desc",
limit=1,
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment