class FormBesoin(wtf.Form): commande = wtf.StringField( label="Commande", validators=[validators.Required('Champ Obligatoires')]) date_echeance = wtf.DateField( label='Date echeance', format='%d/%m/%Y', validators=[validators.Required('Champ Obligatoire'), controle_date]) montant = wtf.FloatField( label='Montant', default=0, widget=NumberInput(), validators=[validators.Required('Champ Obligatoire')]) avance = wtf.FloatField(label='Avance', default=0, widget=NumberInput(), validators=[controle_avance]) projet_id = wtf.SelectField( label='Projet', coerce=str, validators=[validators.Required('Champ Obligatoire')]) fournisseur = wtf.StringField( label='Fournisseur', validators=[validators.Required('Champ Obligatoire')]) solde = wtf.HiddenField() relance = wtf.HiddenField() id = wtf.HiddenField()
class FormTemps(wtf.Form): derob = wtf.HiddenField() derob_day = wtf.HiddenField() date = wtf.DateField(label='Date d\'execution :', format="%d/%m/%Y", validators=[validators.Required('Champ Obligatoire'), control_date]) description = wtf.TextAreaField(label='Description :', validators=[validators.Required('Champ Obligatoire')]) heure = wtf.StringField(label='Nbre d\'Heure :', validators=[control_heure], default='00:00') jour = wtf.IntegerField(label='Nbre de jour :', default=0, widget=NumberInput(), validators=[control_day])
class FormTache(wtf.Form): titre = wtf.StringField( label='Nom de la tache :', validators=[validators.Required('Champ Obligatoire')]) description = wtf.TextAreaField(label='Description :') heure = wtf.StringField( label='Nombre d\'heure :', default=0, widget=NumberInput(), validators=[validators.Required('Champ Obligatoire')]) date_start = wtf.DateField(label='Date de debut :', format='%d/%m/%Y', default=datetime.date.today(), validators=[controle_date_start]) facturable = wtf.StringField( label='Facturation :', validators=[validators.Required('Champ Obligatoire')]) projet_id = wtf.SelectField(label='Projet :', coerce=str, validators=[projet_id_required]) user_id = wtf.SelectField( label='Utilisateur :', coerce=str, validators=[validators.Required('Champ Obligatoire')]) prestation_id = wtf.StringField( label='Prestation :', validators=[validators.Required('Champ Obligatoire')]) contact = wtf.HiddenField(default=None) id = wtf.HiddenField()
class FormEtape(wtf.Form): id = wtf.HiddenField() name = wtf.StringField( label='Nom de l\'etape :', validators=[ validators.Required(message='Champ obligatoire'), validators.length(max=50), unique_code_validator_etape ]) sigle = wtf.StringField() proba = wtf.StringField( label='Changer automatiquement la probabilite a (%) :', widget=NumberInput(), validators=[validators.Required(message='Champ obligatoire')])
class FormPackage(wtf.Form): id = wtf.HiddenField() name = wtf.StringField( label='Nom du package :', validators=[validators.Required(message='Champ obligatoire')]) description = wtf.TextAreaField(label='Description :') duree = wtf.StringField( label=u'Durée/Période/Quantité :', widget=NumberInput(), validators=[validators.Required(message='Champ obligatoire')]) prix = wtf.StringField( label='Prix :', widget=NumberInput(), validators=[validators.Required(message='Champ obligatoire')]) prix_promo = wtf.StringField(label='Prix promotionnel :', widget=NumberInput(), validators=[valid_promo]) promo = wtf.BooleanField() sale = wtf.BooleanField() idligneService = wtf.SelectField( label='Ligne de service :', coerce=str, validators=[validators.Required('Information Obligatoire')])
class FormActivite(wtf.Form): id = wtf.HiddenField() name = wtf.StringField( label='Type de message :', validators=[ validators.Required(message='Champ obligatoire'), validators.length(max=50), unique_code_validator ]) description = wtf.TextAreaField(label='Description :') jour = wtf.StringField(label='Nombre de jour:', widget=NumberInput(), default=0) next = wtf.SelectField(label='Activite suivante recommande :', coerce=str) default = wtf.BooleanField(label='Default :') sigle = wtf.StringField()
class FormProjet(wtf.Form): titre = wtf.StringField( label='Nom du projet', validators=[validators.Required('Champ Obligatoire')]) heure = wtf.IntegerField( label='Nombre d\'heure', default=0, widget=NumberInput(), validators=[validators.Required('Champ Obligatoire')]) montant = wtf.FloatField( label='Montant vendu', validators=[validators.Required('Champ Obligatoire')]) date_start = wtf.DateField(label='Date de debut', format='%d/%m/%Y', validators=[ validators.Required('Champ Obligatoire'), controle_date_start ]) date_end = wtf.DateField(label='Date de fin', format='%d/%m/%Y', validators=[ validators.Required('Champ Obligatoire'), controle_date_end ]) facturable = wtf.BooleanField(label='Facturable ?') domaine_id = wtf.SelectField( label='Domaine ', coerce=str, validators=[validators.Required('Champ Obligatoire')]) client_id = wtf.SelectField( label='Client', coerce=str, validators=[validators.Required('Champ Obligatoire')]) service_id = wtf.StringField( label='Ligne de service', validators=[validators.Required('Champ Obligatoire')]) prospect_id = wtf.StringField(label='Pour le compte de') responsable_id = wtf.SelectField( label='Responsable', coerce=str, validators=[validators.Required('Champ Obligatoire')]) closed = wtf.BooleanField(label='Cloturer ?') id = wtf.HiddenField()