diff --git a/cotisations/forms.py b/cotisations/forms.py index a9f47f28..a5db7b92 100644 --- a/cotisations/forms.py +++ b/cotisations/forms.py @@ -61,21 +61,12 @@ class NewFactureForm(FormRevMixin, ModelForm): # for something more generic or at least in English if allowed_payment: self.fields['paiement'].queryset = allowed_payment - self.fields['cheque'].required = False - self.fields['banque'].required = False - self.fields['cheque'].label = _("Cheque number") - self.fields['banque'].empty_label = _("Not specified") self.fields['paiement'].empty_label = \ _("Select a payment method") - paiement_list = Paiement.objects.filter(type_paiement=1) - if paiement_list: - self.fields['paiement'].widget\ - .attrs['data-cheque'] = paiement_list.first().id - class Meta: model = Facture - fields = ['paiement', 'banque', 'cheque'] + fields = ['paiement'] def clean(self): cleaned_data = super(NewFactureForm, self).clean() diff --git a/cotisations/templates/cotisations/new_facture.html b/cotisations/templates/cotisations/new_facture.html index 6e90a12f..ddb1ece8 100644 --- a/cotisations/templates/cotisations/new_facture.html +++ b/cotisations/templates/cotisations/new_facture.html @@ -44,7 +44,6 @@ with this program; if not, write to the Free Software Foundation, Inc., {% endif %} {% bootstrap_form factureform %} {{ venteform.management_form }} -