# Identification
id = models.IntegerField(primary_key=True)
nom = models.CharField(verbose_name="Titre du poste", max_length=255)
+ # nom_feminin
implantation = models.ForeignKey(ref.Implantation)
type_poste = models.ForeignKey(rh.TypePoste, null=True, related_name='+')
service = models.ForeignKey(rh.Service, related_name='+',
justification = models.TextField()
# Méta
- date_validation = models.DateTimeField() #dae
+ date_validation = models.DateTimeField() # provenance : dae
date_creation = models.DateTimeField(auto_now_add=True)
date_modification = models.DateTimeField(auto_now=True)
date_debut = models.DateField(verbose_name="Date de début",
ordering = ['type']
class PostePiece(models.Model):
+ """Documents relatifs au Poste
+ Ex.: Description de poste
+ """
poste = models.ForeignKey("Poste")
nom = models.CharField(verbose_name="Nom", max_length=255)
fichier = models.FileField(verbose_name="Fichier",
choices=GENRE_CHOICES)
situation_famille = models.CharField(max_length=1, null=True, blank=True,
choices=SITUATION_CHOICES)
- date_entree = models.DateField(null=True, blank=True) #devrait pas être là
+ date_entree = models.DateField(verbose_name="Date d'entrée à l'AUF",
+ null=True, blank=True)
# Coordonnées
tel_domicile = models.CharField(max_length=255, null=True, blank=True)
# Métas
date_creation = models.DateField(auto_now_add=True)
- date_maj = models.DateField(auto_now=True)
+ date_maj = models.DateField(auto_now=True) # date_modification
commentaire = models.TextField(null=True, blank=True)
def __unicode__(self):
return u'%s %s' % (self.prenom, self.nom)
+class EmployePiece(models.Model):
+ """Documents relatifs à l'employé
+ Ex.: CV...
+ """
+ employe = models.ForeignKey("Employe")
+ nom = models.CharField(verbose_name="Nom", max_length=255)
+ fichier = models.FileField(verbose_name="Fichier",
+ upload_to=dossier_piece_dispatch,
+ storage=storage_prive)
+
LIEN_PARENTE_CHOICES = (
('Conjoint', 'Conjoint'),
id = models.IntegerField(primary_key=True)
nom = models.CharField(max_length=255)
prenom = models.CharField(max_length=255)
+ # nationalite facult
+ # date_naissance facultatif
+ # genre facultafif
# Relation
employe = models.ForeignKey('Employe', db_column='employe',
#code = models.CharField(max_length=10, unique=True)
employe = models.ForeignKey('Employe', db_column='employe')
poste = models.ForeignKey('Poste', related_name='+', editable=False)
- #responsable_implantation1 = models.IntegerField()
statut = models.ForeignKey('Statut', related_name='+') # blank=True, null=True ?
organisme_bstg = models.ForeignKey('OrganismeBstg',
null=True, blank=True,
help_text="Si détaché (DET) ou mis à disposition (MAD), \
préciser l'organisme.",
related_name='+')
- organisme_bstg_autre = models.CharField(max_length=255,
- verbose_name="Autre organisme",
- help_text="indiquer l'organisme ici s'il n'est pas dans la liste",
- null=True,
- blank=True,)
# Recrutement
- remplacement = models.BooleanField()
- #remplacement_de = models.ForeignKey('Employe', db_column='remplacement_de',
-# related_name='replaced_by',
-# blank=True, null=True)
+ remplacement = models.BooleanField() # default False
statut_residence = models.CharField(max_length=10, default='local',
verbose_name="Statut",
choices=STATUT_RESIDENCE_CHOICES)
# Rémunération
- classement = models.ForeignKey(rh.Classement, related_name='+',
- verbose_name='Classement proposé')
+ classement = models.ForeignKey(rh.Classement, related_name='+')
regime_travail = models.DecimalField(max_digits=12, decimal_places=2,
verbose_name="Régime de travail",
- help_text="% du temps complet")
+ help_text="% du temps complet") # default = 100
regime_travail_nb_heure_semaine = models.DecimalField(max_digits=12,
- decimal_places=2, verbose_name="Nb. heures par semaine")
-
- # Mandat
-# mandat_date_debut = models.DateField()
-# mandat_date_fin = models.DateField(null=True, blank=True)
+ decimal_places=2, verbose_name="Nb. heures par semaine") # default = 35
+
+ # Occupation du Poste par cet Employe (anciennement "mandat")
+ date_debut = models.DateField(verbose_name="Date de début d'occupation de poste")
+ date_fin = models.DateField(verbose_name="Date de fin d'occupation de poste",
+ null=True, blank=True)
+
# Contrat
- type_contrat = models.ForeignKey('TypeContrat', related_name='+')
- contrat_date_debut = models.DateField(help_text="format: aaaa-mm-jj")
- contrat_date_fin = models.DateField(null=True, blank=True,
- help_text="format: aaaa-mm-jj")
- # Comptes
- compte_compta = models.CharField(max_length=10, default='aucun',
- verbose_name=u'Compte comptabilité',
- choices=COMPTE_COMPTA_CHOICES)
- compte_courriel = models.BooleanField()
+ # m2m Contrat
# Méta
date_creation = models.DateTimeField(auto_now_add=True)
date_modification = models.DateField(auto_now=True)
- commentaire = models.TextField(null=True, blank=True)
+ commentaire = models.TextField(null=True, blank=True)
def __unicode__(self):
return u'%s - %s' % (self.poste.nom, self.employe)
class DossierPiece(models.Model):
+ """Documents relatifs au Dossier (à l'occupation de ce poste par employé).
+ Ex.: Lettre de motivation.
+ """
dossier = models.ForeignKey("Dossier")
nom = models.CharField(verbose_name="Nom", max_length=255)
fichier = models.FileField(verbose_name="Fichier",
upload_to=dossier_piece_dispatch,
storage=storage_prive)
+class DossierCommentaire(models.Model):
+ dossier = models.ForeignKey("Dossier")
+ commentaire = models.TextField(null=True, blank=True)
+ # Méta qui quand...
### RÉMUNÉRATION
type = models.ForeignKey('TypeRemuneration', db_column='type',
related_name='+')
# TODO: what's that?
-# type_revalorisation = models.ForeignKey('TypeRevalorisation',
-# db_column='type_revalorisation',
-# null=True, blank=True)
- montant = models.FloatField(null=True, blank=True) # Annuel
+ type_revalorisation = models.ForeignKey('TypeRevalorisation',
+ db_column='type_revalorisation',
+ null=True, blank=True)
+ montant = models.FloatField(null=True, blank=True) # Annuel (12 mois, 52 semaines, 364 jours)
devise = models.ForeignKey('Devise', to_field='code', db_column='devise')#,
#null=True, blank=True)
- precision = models.CharField(max_length=255, null=True, blank=True)
- #date_effective = models.DateField(null=True, blank=True)
- #pourcentage = models.IntegerField(null=True, blank=True)
+ precision = models.CharField(max_length=255, null=True, blank=True) # precision = commentaire
+ date_debut = models.DateField(null=True, blank=True) # anciennement date_effectif
+ #date_fin = null=True
# Méta
date_creation = models.DateField(auto_now_add=True)
devise = "???"
return "%s %s" % (self.montant, devise)
-
-### JUSTIFICATIONS
-
-TYPE_JUSTIFICATIONS = (
- ('N', 'Nouvel employé'),
- ('R', 'Renouvellement employé'),
-)
-
-class JustificationQuestion(models.Model):
- question = models.CharField(max_length=255)
- type = models.CharField(max_length=255, choices=TYPE_JUSTIFICATIONS)
-
- def __unicode__(self,):
- return self.question
-
-class JustificationNouvelEmploye(models.Model):
+class HistoriqueRemuneration(models.Model):
dossier = models.ForeignKey("Dossier")
- question = models.ForeignKey("JustificationQuestion")
- reponse = models.TextField()
-
-class JustificationAutreEmploye(models.Model):
- dossier = models.ForeignKey("Dossier")
- question = models.ForeignKey("JustificationQuestion")
- reponse = models.TextField()
+ # toujours pertinent si pour chaque Remuneration j'ai dd et df?
### RÉFÉRENCES RH
id = models.IntegerField(primary_key=True)
nom = models.CharField(max_length=255)
nom_feminin = models.CharField(max_length=255)
- description = models.CharField(max_length=255)
+ #description = models.CharField(max_length=255)
is_responsable = models.BooleanField()
famille_emploi = models.ForeignKey('FamilleEmploi',
db_column='famille_emploi')
('Accessoire', 'Accessoire'),
('Charges', 'Charges'),
('Indemnité', 'Indemnité'),
- ('RAS', 'RAS'),
+ ('RAS', 'Rémunération autre source'),
('Traitement', 'Traitement'),
)
return u'%s' % self.nom
class TypeRevalorisation(models.Model):
+ """Justification du changement de la Remuneration.
+ (Actuellement utilisé dans aucun traitement informatique)
+ """
# Identification
id = models.IntegerField(primary_key=True)
nom = models.CharField(max_length=255)
id = models.IntegerField(primary_key=True)
nom = models.CharField(max_length=255)
type = models.CharField(max_length=10, choices=TYPE_ORGANISME_CHOICES)
+ # pays
+
# Méta
actif = models.BooleanField()
type_contrat_categorie = models.CharField(max_length=10,
choices=CONTRAT_CATEGORIE_CHOICES)
#CHOICES A, C (veut dire quoi?) voir TypeContrat.categorie
+ # A = AUF, C = Contractuel ???
# Méta
actif = models.BooleanField()
echelon = models.IntegerField()
degre = models.IntegerField()
coefficient = models.FloatField()
+ # annee # au lieu de date_debut et date_fin
# Méta
commentaire = models.TextField(null=True, blank=True)
date_modification = models.DateField(auto_now=True)
ordering = ['type','echelon','degre','coefficient']
class TauxChange(models.Model):
+ """Taux de change de la devise vers l'euro (EUR)
+ pour cette année budgétaire.
+ """
# Identification
id = models.IntegerField(primary_key=True)
devise = models.ForeignKey('Devise', to_field='code', db_column='devise')
annee = models.IntegerField()
taux = models.FloatField()
- # Relations
- implantation = models.ForeignKey(ref.Implantation,
- db_column='implantation',
- related_name='taux_change')
class ValeurPoint(models.Model):
# Identification
id = models.IntegerField(primary_key=True)
valeur = models.FloatField()
+ # devise
implantation = models.ForeignKey(ref.Implantation,
db_column='implantation',
related_name='valeurs_point')
nom = models.CharField(max_length=255)
nom_long = models.CharField(max_length=255) #description
categorie = models.CharField(max_length=10,
- choices=CONTRAT_CATEGORIE_CHOICES)
+ choices=CONTRAT_CATEGORIE_CHOICES) # A, C?
# Méta
actif = models.BooleanField()
class Meta:
ordering = ['implantation__nom']
+
+class Contrat(models.Model):
+ dossier = models.ForeignKey("Dossier") # 1 contrat peut être dans plusieurs dossier Dossier.contrat = m2m Contrat
+ type_contrat = models.ForeignKey('TypeContrat', related_name='+')
+ date_debut = models.DateField(help_text="format: aaaa-mm-jj")
+ date_fin = models.DateField(null=True, blank=True,
+ help_text="format: aaaa-mm-jj")
+
+class Evenement(models.Models):
+ pass
+ # nom
+ # date_debut
+ # date_fin
+
+class EvenementRemuneration(models.Model):
+ pass
+ # evenement
+ # structure de rémunération hérité de abstract ici