mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Fix l'édition de OptionalUser
This commit is contained in:
parent
cc21c7a5c0
commit
0ceead7969
2 changed files with 1 additions and 13 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue