From bab5679b5727192fe3b5d460bc6123906059bb18 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Caissy Date: Wed, 7 Mar 2012 15:09:19 -0600 Subject: [PATCH] =?utf8?q?Organigramme=20des=20employ=C3=A9s:=20affichage=20?= =?utf8?q?des=20postes=20actifs=20seulement?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/rh/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/rh/admin.py b/project/rh/admin.py index 7462b98..0487e9a 100644 --- a/project/rh/admin.py +++ b/project/rh/admin.py @@ -593,7 +593,7 @@ class EmployeProxyAdmin(EmployeAdmin): def _organigramme(self, obj): l = [] - for d in obj.rh_dossiers.all().order_by('-date_debut'): + for d in rh.Dossier.objects.filter((Q(date_fin__gt=datetime.date.today()) | Q(date_fin=None)) & (Q(date_debut__lt=datetime.date.today()) | Q(date_debut=None)) ).filter(employe=obj.id).all(): poste = u"""