8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-25 08:23:46 +00:00

La cotis est onetone avec la facture

This commit is contained in:
Gabriel Detraz 2016-07-04 03:21:25 +02:00
parent 6a7ed075a4
commit 427c6909c1
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 return self.moyen
class Cotisation(models.Model): 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_start = models.DateTimeField()
date_end = models.DateTimeField() date_end = models.DateTimeField()