Reset all migrations

This commit is contained in:
Skia
2016-08-10 13:52:57 +02:00
parent 792d66da33
commit 1775569ecf
66 changed files with 346 additions and 1545 deletions

View File

@ -8,59 +8,90 @@ import accounting.models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
('club', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AccountingType',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('code', models.CharField(max_length=16, verbose_name='code')),
('label', models.CharField(max_length=60, verbose_name='label')),
('movement_type', models.CharField(choices=[('credit', 'Credit'), ('debit', 'Debit'), ('neutral', 'Neutral')], max_length=12, verbose_name='movement type')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('code', models.CharField(verbose_name='code', max_length=16)),
('label', models.CharField(verbose_name='label', max_length=60)),
('movement_type', models.CharField(verbose_name='movement type', choices=[('credit', 'Credit'), ('debit', 'Debit'), ('neutral', 'Neutral')], max_length=12)),
],
options={
'verbose_name': 'accounting type',
},
),
migrations.CreateModel(
name='BankAccount',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('rib', models.CharField(blank=True, max_length=255, verbose_name='rib')),
('number', models.CharField(blank=True, max_length=255, verbose_name='account number')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('iban', models.CharField(blank=True, verbose_name='iban', max_length=255)),
('number', models.CharField(blank=True, verbose_name='account number', max_length=255)),
('club', models.ForeignKey(related_name='bank_accounts', to='club.Club')),
],
),
migrations.CreateModel(
name='ClubAccount',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('bank_account', models.ForeignKey(to='accounting.BankAccount', related_name='club_accounts')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('bank_account', models.ForeignKey(related_name='club_accounts', to='accounting.BankAccount')),
('club', models.OneToOneField(related_name='club_account', to='club.Club')),
],
),
migrations.CreateModel(
name='Company',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('name', models.CharField(verbose_name='name', max_length=60)),
],
options={
'verbose_name': 'company',
},
),
migrations.CreateModel(
name='GeneralJournal',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('start_date', models.DateField(verbose_name='start date')),
('end_date', models.DateField(default=None, blank=True, verbose_name='end date', null=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('closed', models.BooleanField(verbose_name='is closed', default=False)),
('club_account', models.ForeignKey(to='accounting.ClubAccount', related_name='journals')),
('end_date', models.DateField(default=None, null=True, verbose_name='end date', blank=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('closed', models.BooleanField(default=False, verbose_name='is closed')),
('amount', accounting.models.CurrencyField(default=0, decimal_places=2, max_digits=12, verbose_name='amount')),
('effective_amount', accounting.models.CurrencyField(default=0, decimal_places=2, max_digits=12, verbose_name='effective_amount')),
('club_account', models.ForeignKey(related_name='journals', to='accounting.ClubAccount')),
],
),
migrations.CreateModel(
name='Operation',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('amount', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='amount')),
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('number', models.IntegerField(verbose_name='number')),
('amount', accounting.models.CurrencyField(decimal_places=2, max_digits=12, verbose_name='amount')),
('date', models.DateField(verbose_name='date')),
('remark', models.TextField(max_length=255, verbose_name='remark')),
('mode', models.CharField(choices=[('cheque', 'Chèque'), ('cash', 'Espèce'), ('transfert', 'Virement'), ('card', 'Carte banquaire')], max_length=255, verbose_name='payment method')),
('cheque_number', models.IntegerField(verbose_name='cheque number')),
('invoice', models.FileField(blank=True, upload_to='invoices', null=True)),
('done', models.BooleanField(verbose_name='is done', default=False)),
('journal', models.ForeignKey(to='accounting.GeneralJournal', related_name='operations')),
('type', models.ForeignKey(to='accounting.AccountingType', related_name='operations')),
('label', models.CharField(verbose_name='label', max_length=50)),
('remark', models.TextField(verbose_name='remark', max_length=255)),
('mode', models.CharField(verbose_name='payment method', choices=[('CHEQUE', 'Check'), ('CASH', 'Cash'), ('TRANSFert', 'Transfert'), ('CARD', 'Credit card')], max_length=255)),
('cheque_number', models.IntegerField(default=-1, verbose_name='cheque number')),
('done', models.BooleanField(default=False, verbose_name='is done')),
('target_type', models.CharField(verbose_name='target type', choices=[('USER', 'User'), ('CLUB', 'Club'), ('ACCOUNT', 'Account'), ('COMPANY', 'Company'), ('OTHER', 'Other')], max_length=10)),
('target_id', models.IntegerField(null=True, verbose_name='target id', blank=True)),
('target_label', models.CharField(default='', blank=True, verbose_name='target label', max_length=32)),
('accounting_type', models.ForeignKey(verbose_name='accounting type', related_name='operations', to='accounting.AccountingType')),
('invoice', models.ForeignKey(verbose_name='invoice', related_name='operations', blank=True, null=True, to='core.SithFile')),
('journal', models.ForeignKey(related_name='operations', to='accounting.GeneralJournal')),
],
options={
'ordering': ['-number'],
},
),
migrations.AlterUniqueTogether(
name='operation',
unique_together=set([('number', 'journal')]),
),
]