8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-28 01:43:46 +00:00

Merge branch 'hotfix_baseinvoice_import_date' into 'dev'

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

See merge request federez/re2o!268
This commit is contained in:
chirac 2018-08-25 13:01:50 +02:00
commit 48be064b94

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