mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 22:52:26 +00:00
La cotis est onetone avec la facture
This commit is contained in:
parent
6a7ed075a4
commit
427c6909c1
3 changed files with 21 additions and 1 deletions
Binary file not shown.
20
cotisations/migrations/0012_auto_20160704_0118.py
Normal file
20
cotisations/migrations/0012_auto_20160704_0118.py
Normal 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'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue