Browse Source

status des adhésions

Élie Bouttier 7 years ago
parent
commit
eb334c626c
3 changed files with 24 additions and 3 deletions
  1. 3 3
      adhesions/admin.py
  2. 20 0
      adhesions/migrations/0013_adhesion_active.py
  3. 1 0
      adhesions/models.py

+ 3 - 3
adhesions/admin.py

@@ -152,9 +152,9 @@ class AdherentTypeFilter(admin.SimpleListFilter):
 
 
 class AdhesionAdmin(admin.ModelAdmin):
-    list_display = ('get_id', 'get_adherent_link', 'type',)
-    list_filter = (AdherentTypeFilter,)
-    fields = ('id', 'type', 'get_adherent_link', 'notes')
+    list_display = ('get_id', 'type', 'get_adherent_link', 'active')
+    list_filter = (AdherentTypeFilter, 'active',)
+    fields = ('id', 'type', 'get_adherent_link', 'active', 'notes')
     readonly_fields = ('id', 'type', 'get_adherent_link',)
     search_fields = ('=id', 'notes',)
     inlines = (ServiceInline,)#PaymentInline,)

+ 20 - 0
adhesions/migrations/0013_adhesion_active.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11 on 2017-06-13 11:59
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('adhesions', '0012_adhesion_notes'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='adhesion',
+            name='active',
+            field=models.NullBooleanField(default=None, verbose_name='Adhésion en cours'),
+        ),
+    ]

+ 1 - 0
adhesions/models.py

@@ -26,6 +26,7 @@ class Adhesion(models.Model):
                                    related_query_name='adhesion')
     created = models.DateTimeField(null=True, blank=True, auto_now_add=True)
     notes = models.TextField(blank=True, default='')
+    active = models.NullBooleanField(default=None, verbose_name='Adhésion en cours')
 
     class Meta:
         verbose_name = 'adhésion'