Browse Source

La cotis est onetone avec la facture

rewrite_authors
Gabriel Detraz 10 years ago
parent
commit
427c6909c1
  1. BIN
      cotisations/__pycache__/models.cpython-34.pyc
  2. 20
      cotisations/migrations/0012_auto_20160704_0118.py
  3. 2
      cotisations/models.py

BIN
cotisations/__pycache__/models.cpython-34.pyc

Binary file not shown.

20
cotisations/migrations/0012_auto_20160704_0118.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cotisations', '0011_auto_20160702_1911'),
]
operations = [
migrations.AlterField(
model_name='cotisation',
name='facture',
field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='cotisations.Facture'),
),
]

2
cotisations/models.py

@ -40,7 +40,7 @@ class Paiement(models.Model):
return self.moyen
class Cotisation(models.Model):
facture = models.ForeignKey('Facture', on_delete=models.PROTECT)
facture = models.OneToOneField('Facture', on_delete=models.PROTECT)
date_start = models.DateTimeField()
date_end = models.DateTimeField()

Loading…
Cancel
Save