8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Donne la bonne date lors de l'import des factures dans BaseInvoice.

This commit is contained in:
Hugo LEVY-FALK 2018-08-25 11:10:18 +02:00
parent 5208a9ca82
commit 74a2e265fa

View file

@ -14,7 +14,9 @@ def reattribute_ids(apps, schema_editor):
BaseInvoice = apps.get_model('cotisations', 'BaseInvoice')
for f in Facture.objects.all():
base = BaseInvoice.objects.create(id=f.pk, date=f.date)
base = BaseInvoice.objects.create(id=f.pk)
base.date = f.date
base.save()
f.baseinvoice_ptr = base
f.save()