# -*- encoding: utf-8 -*-
+import datetime
from django.db import models
from django.db.models import Q
from auf.django.metadata.managers import NoDeleteManager
prefixe_implantation = "implantation__region"
def actifs(self):
- return super(PosteManager, self).get_query_set().filter(date_fin__gt=datetime.datetime.now())
+ q_actif = Q(date_fin__gt=datetime.datetime.now()) | Q(date_fin__isnull=True)
+ return super(PosteManager, self).get_query_set().filter(q_actif)
def ma_region_ou_service(self, user):
return super(PosteManager, self).ma_region_ou_service(user)
use_for_related_fields = True
prefixe_implantation = "implantation__region"
+
class DossierComparaisonManager(SecurityManager):
use_for_related_fields = True
prefixe_implantation = "implantation__region"
+
+
+class DeviseManager(NoDeleteManager):
+ pass
+
+class ServiceManager(NoDeleteManager):
+ pass
+
+class TypeRemunerationManager(NoDeleteManager):
+ pass