forked from DGNum/gestioCOF
Rename model: Statement -> CheckoutStatement
Nom plus clair
This commit is contained in:
parent
51c1767ffe
commit
fb8882d06e
2 changed files with 40 additions and 1 deletions
39
kfet/migrations/0027_auto_20160811_0648.py
Normal file
39
kfet/migrations/0027_auto_20160811_0648.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('kfet', '0026_auto_20160809_0810'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CheckoutStatement',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('balance_old', models.DecimalField(decimal_places=2, max_digits=6)),
|
||||
('balance_new', models.DecimalField(decimal_places=2, max_digits=6)),
|
||||
('amount_taken', models.DecimalField(decimal_places=2, max_digits=6)),
|
||||
('amount_error', models.DecimalField(decimal_places=2, max_digits=6)),
|
||||
('at', models.DateTimeField(auto_now_add=True)),
|
||||
('by', models.ForeignKey(to='kfet.Account', on_delete=django.db.models.deletion.PROTECT, related_name='+')),
|
||||
('checkout', models.ForeignKey(to='kfet.Checkout', on_delete=django.db.models.deletion.PROTECT, related_name='statements')),
|
||||
],
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='statement',
|
||||
name='by',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='statement',
|
||||
name='checkout',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='Statement',
|
||||
),
|
||||
]
|
|
@ -247,7 +247,7 @@ class CheckoutTransfer(models.Model):
|
|||
amount = models.DecimalField(
|
||||
max_digits = 6, decimal_places = 2)
|
||||
|
||||
class Statement(models.Model):
|
||||
class CheckoutStatement(models.Model):
|
||||
by = models.ForeignKey(
|
||||
Account, on_delete = models.PROTECT,
|
||||
related_name = "+")
|
||||
|
|
Loading…
Reference in a new issue