Commit 0ceead79 authored by Hugo LEVY-FALK's avatar Hugo LEVY-FALK

Fix l'édition de OptionalUser

parent cc21c7a5
......@@ -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'
......
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment