retrait de actif
[auf_rh_dae.git] / project / rh / managers.py
index 4247d43..e2a3916 100644 (file)
@@ -79,8 +79,11 @@ class PosteManager(SecurityManager, NoDeleteManager):
     prefixe_service = "service"
     prefixe_implantation = "implantation__region"
 
+    def actifs(self):
+        return super(PosteManager, self).get_query_set().filter(date_fin__gt=datetime.datetime.now())
+
     def ma_region_ou_service(self, user):
-        return super(PosteManager, self).ma_region_ou_service(user).filter(actif=True)
+        return super(PosteManager, self).ma_region_ou_service(user)
 
     def get_query_set(self):
         fkeys = (
@@ -112,7 +115,7 @@ class DossierManager(SecurityManager, NoDeleteManager):
                                         .select_related(*fkeys).all()
 
     def ma_region_ou_service(self, user):
-        return super(DossierManager, self).ma_region_ou_service(user).filter(poste__actif=True)
+        return super(DossierManager, self).ma_region_ou_service(user)
 
 
 class PosteComparaisonManager(SecurityManager):