From 37868f0b7333696ec52ead28f9e37468acbb6b1c Mon Sep 17 00:00:00 2001 From: Nicolas Cadou Date: Thu, 12 May 2011 22:55:48 -0400 Subject: [PATCH] rh.Poste et rh.Dossier sont maintenant abstract --- project/rh/models.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/project/rh/models.py b/project/rh/models.py index e6240e1..4156a81 100644 --- a/project/rh/models.py +++ b/project/rh/models.py @@ -69,7 +69,7 @@ POSTE_APPEL_CHOICES = ( ('externe', 'Externe'), ) -class Poste(Metadata): +class Poste_(Metadata): """Un Poste est un emploi (job) à combler dans une implantation. Un Poste peut être comblé par un Employe, auquel cas un Dossier est créé. Si on veut recruter 2 jardiniers, 2 Postes distincts existent. @@ -185,6 +185,7 @@ class Poste(Metadata): null=True, blank=True) class Meta: + abstract = True ordering = ['implantation__nom', 'nom'] def __unicode__(self): @@ -193,6 +194,10 @@ class Poste(Metadata): return u'%s - %s [%s]' % (self.implantation, self.nom, self.id) +class Poste(Poste_): + __doc__ = Poste_.__doc__ + + POSTE_FINANCEMENT_CHOICES = ( ('A', 'A - Frais de personnel'), ('B', 'B - Projet(s)-Titre(s)'), @@ -374,7 +379,7 @@ COMPTE_COMPTA_CHOICES = ( ('aucun', 'Aucun'), ) -class Dossier(Metadata): +class Dossier_(Metadata): """Le Dossier regroupe les informations relatives à l'occupation d'un Poste par un Employe. Un seul Dossier existe par Poste occupé par un Employe. @@ -431,11 +436,17 @@ class Dossier(Metadata): # TODO? class Meta: + abstract = True ordering = ['poste__nom', 'employe__nom_affichage'] def __unicode__(self): return u'%s - %s' % (self.poste.nom, self.employe) + +class Dossier(Dossier_): + __doc__ = Dossier_.__doc__ + + class DossierPiece(models.Model): """Documents relatifs au Dossier (à l'occupation de ce poste par employé). Ex.: Lettre de motivation. -- 1.7.10.4