p = get_object_or_404(rh.Poste, pk=id)
# Initialisation avec les valeurs du poste de rh_v1
poste = dae.Poste(id_rh=p, nom=p.type_poste.nom)
- for field in ('implantation', 'type_poste', 'actif'):
+ for field in ('implantation', 'type_poste', ):
setattr(poste, field, getattr(p, field))
else:
# Nouveau poste
data = []
# Voir le code de _poste_choices dans forms.py
- dae_ = dae.Poste.objects.filter(actif=True, id_rh__isnull=True)
+ dae_ = dae.Poste.actifs.filter(id_rh__isnull=True)
copies = dae.Poste.objects.exclude(id_rh__isnull=True)
- rh_postes_actifs = rh.Poste.objects.filter(actif=True)
+ rh_postes_actifs = rh.Poste.actifs.all()
if 'implantation_id' in params and params.get('implantation_id') is not u"":
implantation_id = params.get('implantation_id')