# REGION
else:
q_dae_region_service = Q(poste__implantation__region=employe.implantation.region)
- q_rh_region_service = Q(implantation1__region=employe.implantation.region) | Q(implantation2__region=employe.implantation.region)
+ q_rh_region_service = Q(implantation1__region=employe.implantation.region) | Q(implantation2__region=employe.implantation.region)
# TRAITEMENT DRH
if grp_drh in request.user.groups.all():
q_dae_region_service = Q()
FinancementForm = inlineformset_factory(dae.Poste, dae.PosteFinancement, extra=2)
class DossierComparaisonForm(forms.ModelForm):
-
+
recherche = AutoCompleteSelectField('dossiers', required=False)
poste = forms.CharField(max_length=255, widget=forms.TextInput(attrs={'size':'60'}))
)
class PosteComparaisonForm(forms.ModelForm):
-
+
recherche = AutoCompleteSelectField('postes', required=False)
class Meta:
# La liste des choix est laissée vide. Voir __init__ pour la raison.
poste = forms.ChoiceField(label="Nouveau poste ou évolution du poste",
choices=(), required=False)
-
+
valeur_point_min = forms.ModelChoiceField(queryset=rh.ValeurPoint.actuelles.all(), required=False)
valeur_point_max = forms.ModelChoiceField(queryset=rh.ValeurPoint.actuelles.all(), required=False)
-
-
+
+
class Meta:
model = dae.Poste
exclude = ('actif', )
"""
cleaned_data = self.cleaned_data
- # Gestion de la mise à disposition
- mise_a_disposition = cleaned_data.get("mise_a_disposition")
- valeur_point_min = cleaned_data.get("valeur_point_min")
- valeur_point_max = cleaned_data.get("valeur_point_max")
- if mise_a_disposition is False and (valeur_point_min is None or valeur_point_max is None):
- msg = u"Ce champ est obligatoire."
- self._errors["valeur_point_min"] = self.error_class([msg])
- self._errors["valeur_point_max"] = self.error_class([msg])
- raise forms.ValidationError("Les valeurs de point sont vides")
-
if cleaned_data.get("local") is False and cleaned_data.get("expatrie") is False:
msg = "Le poste doit au moins être ouvert localement ou aux expatriés"
self._errors["local"] = self.error_class([msg])
self._errors["expatrie"] = ''
raise forms.ValidationError(msg)
-
return cleaned_data
chargement_vp.success(function(data) {
var items = [];
- var options = "";
+ var options = '<option value="">---------</option>';
$.each(data, function() {
var suggestion = "";
if (this.suggestion) {
- suggestion = " style='font-weight: bold; color: black;' "
+ suggestion = ' style="font-weight: bold; color: black;" '
}
- options += '<option ' + suggestion + ' value="' + this.id + '">' + this.label + '</option>';
+ options += '<option' + suggestion + ' value="' + this.id + '">' + this.label + '</option>';
});
$("#id_valeur_point_min").html(options);
valeur_point = 0;
else
valeur_point = clean_float(valeur_point_text.split(" ")[0]);
-
+
if (salaire_manuel == false) {
salaire = clean_float(valeur_point * coeff);
salaire_input.val(salaire);
chargement_devise.error(function(data) {
alert(data.responseText);
});
-
+
});
$('#id_devise_min, #id_devise_max').change(function(e) {
contrat_mois();
});
contrat_mois();
-
+
/* on charge les postes reliés à cette implantation */
charger_postes($("#id_implantation :selected").val());
chargement_poste.error(function(data) {
alert(data.responseText);
});
-
+
/* on ne veut pas afficher la personne en-dessous */
$(this).find('div').remove();
input.val('');