From f90f381d389846ea14af348f666ab81945df055a Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sat, 19 Aug 2017 00:58:42 +0200 Subject: [PATCH] Fix ajout moyen de paiement --- .../migrations/0019_auto_20170819_0055.py | 20 +++++++++++++++++++ .../migrations/0020_auto_20170819_0057.py | 20 +++++++++++++++++++ cotisations/models.py | 6 +++--- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 cotisations/migrations/0019_auto_20170819_0055.py create mode 100644 cotisations/migrations/0020_auto_20170819_0057.py diff --git a/cotisations/migrations/0019_auto_20170819_0055.py b/cotisations/migrations/0019_auto_20170819_0055.py new file mode 100644 index 00000000..e4794a01 --- /dev/null +++ b/cotisations/migrations/0019_auto_20170819_0055.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-08-18 22:55 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cotisations', '0018_paiement_type_paiement'), + ] + + operations = [ + migrations.AlterField( + model_name='paiement', + name='type_paiement', + field=models.CharField(choices=[(0, 'Autre'), (1, 'Chèque')], default=0, max_length=255), + ), + ] diff --git a/cotisations/migrations/0020_auto_20170819_0057.py b/cotisations/migrations/0020_auto_20170819_0057.py new file mode 100644 index 00000000..c0a319e8 --- /dev/null +++ b/cotisations/migrations/0020_auto_20170819_0057.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-08-18 22:57 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cotisations', '0019_auto_20170819_0055'), + ] + + operations = [ + migrations.AlterField( + model_name='paiement', + name='type_paiement', + field=models.IntegerField(choices=[(0, 'Autre'), (1, 'Chèque')], default=0, max_length=255), + ), + ] diff --git a/cotisations/models.py b/cotisations/models.py index ce6e8c96..692ff3a2 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -157,12 +157,12 @@ class Banque(models.Model): class Paiement(models.Model): PRETTY_NAME = "Moyens de paiement" PAYMENT_TYPES = ( - ('check', 'Chèque'), - (None, 'Autre'), + (0, 'Autre'), + (1, 'Chèque'), ) moyen = models.CharField(max_length=255) - type_paiement = models.CharField(choices=PAYMENT_TYPES, max_length=255) + type_paiement = models.IntegerField(choices=PAYMENT_TYPES, default=0, max_length=255) def __str__(self): return self.moyen