From 0ceead79699017f6cf537d400eb627fe53d1ff74 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sun, 15 Jul 2018 12:50:27 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20l'=C3=A9dition=20de=20OptionalUser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- preferences/forms.py | 8 +------- preferences/models.py | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/preferences/forms.py b/preferences/forms.py index afe111a2..477d4d57 100644 --- a/preferences/forms.py +++ b/preferences/forms.py @@ -38,6 +38,7 @@ from .models import ( Service ) + class EditOptionalUserForm(ModelForm): """Formulaire d'édition des options de l'user. (solde, telephone..)""" class Meta: @@ -54,13 +55,6 @@ class EditOptionalUserForm(ModelForm): self.fields['is_tel_mandatory'].label = ( 'Exiger un numéro de téléphone' ) - self.fields['user_solde'].label = ( - 'Activation du solde pour les utilisateurs' - ) - self.fields['max_solde'].label = 'Solde maximum' - self.fields['min_online_payment'].label = ( - 'Montant de rechargement minimum en ligne' - ) self.fields['self_adhesion'].label = 'Auto inscription' diff --git a/preferences/models.py b/preferences/models.py index 2fd7d45a..d39b9f8e 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -31,7 +31,6 @@ from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache -import cotisations.models import machines.models from re2o.mixins import AclMixin @@ -90,11 +89,6 @@ class OptionalUser(AclMixin, PreferencesModel): ("view_optionaluser", "Peut voir les options de l'user"), ) - def clean(self): - """Creation du mode de paiement par solde""" - if self.user_solde: - cotisations.models.Paiement.objects.get_or_create(is_balance=True) - @receiver(post_save, sender=OptionalUser) def optionaluser_post_save(**kwargs):