8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-06-18 00:28:11 +00:00

La cotis est onetone avec la facture

This commit is contained in:
chirac 2016-07-04 03:21:25 +02:00
parent a6ebf5f375
commit 65bf6d398a
3 changed files with 21 additions and 1 deletions

View file

@ -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'),
),
]

View file

@ -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()