[FIX] hr: mention suggestions, exclude disabled employees partners

It was possible to mention an employee despite the
fact the associated partner and user were
both disabled.

opw-671130
This commit is contained in:
Denis Ledoux
2016-03-07 18:22:41 +01:00
parent 240417be1e
commit 84b45515bd
+1 -1
View File
@@ -17,6 +17,6 @@ class Partner(models.Model):
FROM res_users U
INNER JOIN res_groups_users_rel R ON U.id = R.uid
INNER JOIN res_partner P ON P.id = U.partner_id
WHERE R.gid = %s""", (employee_group_id,))
WHERE R.gid = %s AND P.active = 't'""", (employee_group_id,))
suggestions.append(self._cr.dictfetchall())
return suggestions