mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 06:32:26 +00:00
Donne la bonne date lors de l'import des factures dans BaseInvoice.
This commit is contained in:
parent
5208a9ca82
commit
74a2e265fa
1 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,9 @@ def reattribute_ids(apps, schema_editor):
|
||||||
BaseInvoice = apps.get_model('cotisations', 'BaseInvoice')
|
BaseInvoice = apps.get_model('cotisations', 'BaseInvoice')
|
||||||
|
|
||||||
for f in Facture.objects.all():
|
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.baseinvoice_ptr = base
|
||||||
f.save()
|
f.save()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue