merge regio
[auf_rh_dae.git] / project / rh / managers.py
index 6b8da7e..c1a459a 100644 (file)
@@ -27,7 +27,10 @@ class SecurityManager(models.Manager):
         # TRAITEMENT NORMAL
         ############################################
         # REGION
-        q = Q(**{self.prefixe_implantation: employe.implantation.region})
+        q = Q(**{
+            self.prefixe_implantation:
+            employe.implantation.zone_administrative
+        })
 
         # SERVICE
         if self.prefixe_service \
@@ -152,7 +155,7 @@ class PosteQuerySet(ActifsQuerySet):
 
 class PosteManager(SecurityManager):
     prefixe_service = "service"
-    prefixe_implantation = "implantation__region"
+    prefixe_implantation = "implantation__zone_administrative"
 
     def get_query_set(self):
         return PosteQuerySet(self.model).select_related('type_poste')
@@ -169,7 +172,7 @@ class DossierQuerySet(ActifsQuerySet):
 
 class DossierManager(SecurityManager):
     prefixe_service = "poste__service"
-    prefixe_implantation = "poste__implantation__region"
+    prefixe_implantation = "poste__implantation__zone_administrative"
 
     def get_query_set(self):
         return DossierQuerySet(self.model) \
@@ -235,12 +238,12 @@ class ContratManager(models.Manager):
 
 class PosteComparaisonManager(SecurityManager):
     use_for_related_fields = True
-    prefixe_implantation = "implantation__region"
+    prefixe_implantation = "implantation__zone_administrative"
 
 
 class DossierComparaisonManager(SecurityManager):
     use_for_related_fields = True
-    prefixe_implantation = "implantation__region"
+    prefixe_implantation = "implantation__zone_administrative"
 
 
 class DeviseManager(models.Manager):