Commit 37f96d78 authored by jocelyn's avatar jocelyn

Merge remote-tracking branch 'ARN/enh-add-balance-rebase'

parents 48812ff5 4a863a22
......@@ -178,6 +178,14 @@ class MemberAdmin(UserAdmin):
return mark_safe()
enhanced_end_date_of_membership.short_description = "Date de fin d'adhésion"
def get_list_display(self, request, obj=None):
list_display = list(self.list_display[:]) # Copy
if settings.HANDLE_BALANCE:
list_display.append('balance')
return list_display
def get_fieldsets(self, request, obj=None):
coord_fieldset = ('Coordonnées', {'fields': (
('email', 'send_membership_fees_email'),
......
......@@ -123,7 +123,7 @@ class Member(CoinLdapSyncMixin, AbstractUser):
default=True, verbose_name='relance de cotisation',
help_text='Précise si l\'utilisateur doit recevoir des mails de relance pour la cotisation. Certains membres n\'ont pas à recevoir de relance (prélèvement automatique, membres d\'honneurs, etc.)')
balance = models.DecimalField(max_digits=5, decimal_places=2, default=0,
verbose_name='account balance')
verbose_name='solde')
objects = MemberManager.from_queryset(MemberQuerySet)()
......
......@@ -5,7 +5,7 @@
{% block content %}
{% if handle_balance %}
<h2>Balance : {{ balance|floatformat }} €</h2>
<h2>Solde : {{ balance|floatformat }} €</h2>
{% endif %}
<h2>Mes factures</h2>
......
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