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')]),
),
]

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('club', '0001_initial'),
('accounting', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='clubaccount',
name='club',
field=models.OneToOneField(to='club.Club', related_name='club_account'),
),
migrations.AddField(
model_name='bankaccount',
name='club',
field=models.ForeignKey(to='club.Club', related_name='bank_accounts'),
),
]

View File

@ -1,30 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0002_auto_20160530_1001'),
]
operations = [
migrations.RemoveField(
model_name='bankaccount',
name='rib',
),
migrations.AddField(
model_name='bankaccount',
name='iban',
field=models.CharField(blank=True, verbose_name='iban', max_length=255),
),
migrations.AddField(
model_name='generaljournal',
name='amount',
field=accounting.models.CurrencyField(default=0, max_digits=12, decimal_places=2, verbose_name='amount'),
preserve_default=False,
),
]

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0003_auto_20160617_1520'),
]
operations = [
migrations.AlterField(
model_name='generaljournal',
name='amount',
field=accounting.models.CurrencyField(max_digits=12, verbose_name='amount', default=0, decimal_places=2),
),
]

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0004_auto_20160620_1307'),
]
operations = [
migrations.RenameField(
model_name='operation',
old_name='type',
new_name='accounting_type',
),
migrations.AddField(
model_name='generaljournal',
name='effective_amount',
field=accounting.models.CurrencyField(default=0, decimal_places=2, verbose_name='effective_amount', max_digits=12),
),
]

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0005_auto_20160622_0953'),
]
operations = [
migrations.AddField(
model_name='operation',
name='type',
field=models.CharField(verbose_name='operation type', choices=[('DEBIT', 'Debit'), ('CREDIT', 'Credit')], max_length=10, default='DEBIT'),
preserve_default=False,
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0006_operation_type'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='cheque_number',
field=models.IntegerField(verbose_name='cheque number', default=-1),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0007_auto_20160622_0959'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='type',
field=models.CharField(verbose_name='operation type', choices=[('debit', 'Debit'), ('credit', 'Credit')], max_length=10),
),
]

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0008_auto_20160622_1005'),
]
operations = [
migrations.AddField(
model_name='operation',
name='label',
field=models.CharField(verbose_name='label', default='', max_length=50),
preserve_default=False,
),
migrations.AlterField(
model_name='operation',
name='type',
field=models.CharField(verbose_name='operation type', choices=[('debit', 'Debit'), ('credit', 'Credit')], max_length=8),
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0009_auto_20160622_1030'),
]
operations = [
migrations.RemoveField(
model_name='operation',
name='type',
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0010_remove_operation_type'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='mode',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('cheque', 'Check'), ('cash', 'Cash'), ('transfert', 'Transfert'), ('card', 'Credit card')]),
),
]

View File

@ -1,28 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0011_auto_20160718_1805'),
]
operations = [
migrations.AlterModelOptions(
name='operation',
options={'ordering': ['-number']},
),
migrations.AddField(
model_name='operation',
name='number',
field=models.IntegerField(default=1, verbose_name='number'),
preserve_default=False,
),
migrations.AlterUniqueTogether(
name='operation',
unique_together=set([('number', 'journal')]),
),
]

View File

@ -1,40 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0012_auto_20160720_1847'),
]
operations = [
migrations.CreateModel(
name='Company',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
('name', models.CharField(max_length=60, verbose_name='name')),
],
options={
'verbose_name': 'company',
},
),
migrations.AddField(
model_name='operation',
name='target_id',
field=models.IntegerField(blank=True, null=True, verbose_name='target id'),
),
migrations.AddField(
model_name='operation',
name='target_label',
field=models.CharField(max_length=32, blank=True, default='', verbose_name='target label'),
),
migrations.AddField(
model_name='operation',
name='target_type',
field=models.CharField(max_length=10, default='OTHER', choices=[('USER', 'User'), ('CLUB', 'Club'), ('ACCOUNT', 'Account'), ('COMPANY', 'Company'), ('OTHER', 'Other')], verbose_name='target type'),
preserve_default=False,
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0013_auto_20160807_1923'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='mode',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('CHEQUE', 'Check'), ('CASH', 'Cash'), ('TRANSFert', 'Transfert'), ('CARD', 'Credit card')]),
),
]

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0014_auto_20160807_1954'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='accounting_type',
field=models.ForeignKey(related_name='operations', verbose_name='accounting type', to='accounting.AccountingType'),
),
migrations.AlterField(
model_name='operation',
name='invoice',
field=models.FileField(upload_to='invoices', verbose_name='invoice', null=True, blank=True),
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0015_auto_20160807_1959'),
]
operations = [
migrations.AlterModelOptions(
name='accountingtype',
options={'verbose_name': 'accounting type'},
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0016_auto_20160807_2000'),
]
operations = [
migrations.AlterField(
model_name='operation',
name='invoice',
field=models.ForeignKey(blank=True, related_name='operations', to='core.SithFile', null=True, verbose_name='invoice'),
),
]

View File

@ -2,8 +2,8 @@
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import django.core.validators
from django.conf import settings
class Migration(migrations.Migration):
@ -18,25 +18,25 @@ class Migration(migrations.Migration):
name='Club',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('unix_name', models.CharField(validators=[django.core.validators.RegexValidator('^[a-z0-9][a-z0-9._-]*[a-z0-9]$', 'Enter a valid unix name. This value may contain only letters, numbers ./-/_ characters.')], unique=True, max_length=30, verbose_name='unix name', error_messages={'unique': 'A club with that unix name already exists.'})),
('address', models.CharField(max_length=254, verbose_name='address')),
('edit_groups', models.ManyToManyField(related_name='editable_club', to='core.Group', blank=True)),
('owner_group', models.ForeignKey(to='core.Group', related_name='owned_club', default=1)),
('parent', models.ForeignKey(to='club.Club', related_name='children', null=True, blank=True)),
('view_groups', models.ManyToManyField(related_name='viewable_club', to='core.Group', blank=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('unix_name', models.CharField(verbose_name='unix name', unique=True, error_messages={'unique': 'A club with that unix name already exists.'}, max_length=30, validators=[django.core.validators.RegexValidator('^[a-z0-9][a-z0-9._-]*[a-z0-9]$', 'Enter a valid unix name. This value may contain only letters, numbers ./-/_ characters.')])),
('address', models.CharField(verbose_name='address', max_length=254)),
('edit_groups', models.ManyToManyField(to='core.Group', related_name='editable_club', blank=True)),
('owner_group', models.ForeignKey(related_name='owned_club', default=1, to='core.Group')),
('parent', models.ForeignKey(blank=True, null=True, to='club.Club', related_name='children')),
('view_groups', models.ManyToManyField(to='core.Group', related_name='viewable_club', blank=True)),
],
),
migrations.CreateModel(
name='Membership',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('start_date', models.DateField(auto_now=True, verbose_name='start date')),
('end_date', models.DateField(blank=True, verbose_name='end date', null=True)),
('role', models.IntegerField(choices=[(0, 'Curieux'), (1, 'Membre actif'), (2, 'Membre du bureau'), (3, 'Responsable info'), (4, 'Secrétaire'), (5, 'Responsable com'), (7, 'Trésorier'), (9, 'Vice-Président'), (10, 'Président')], verbose_name='role', default=0)),
('description', models.CharField(blank=True, max_length=30, verbose_name='description')),
('club', models.ForeignKey(to='club.Club', related_name='members')),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='membership')),
('start_date', models.DateField(verbose_name='start date', auto_now=True)),
('end_date', models.DateField(verbose_name='end date', null=True, blank=True)),
('role', models.IntegerField(default=0, verbose_name='role', choices=[(0, 'Curious'), (1, 'Active member'), (2, 'Board member'), (3, 'IT supervisor'), (4, 'Secretary'), (5, 'Communication supervisor'), (7, 'Treasurer'), (9, 'Vice-President'), (10, 'President')])),
('description', models.CharField(verbose_name='description', max_length=30, blank=True)),
('club', models.ForeignKey(verbose_name='club', related_name='members', to='club.Club')),
('user', models.ForeignKey(verbose_name='user', related_name='membership', to=settings.AUTH_USER_MODEL)),
],
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('club', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='membership',
name='role',
field=models.IntegerField(verbose_name='role', default=0, choices=[(0, 'Curious'), (1, 'Active member'), (2, 'Board member'), (3, 'IT supervisor'), (4, 'Secretary'), (5, 'Communication supervisor'), (7, 'Treasurer'), (9, 'Vice-President'), (10, 'President')]),
),
]

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('club', '0002_auto_20160718_1456'),
]
operations = [
migrations.AlterField(
model_name='membership',
name='club',
field=models.ForeignKey(to='club.Club', verbose_name='club', related_name='members'),
),
migrations.AlterField(
model_name='membership',
name='user',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='user', related_name='membership'),
),
]

View File

@ -2,11 +2,11 @@
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import django.core.validators
import django.db.models.deletion
import core.models
import django.contrib.auth.models
import core.models
import django.db.models.deletion
import django.core.validators
from django.conf import settings
class Migration(migrations.Migration):
@ -19,24 +19,22 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('password', models.CharField(verbose_name='password', max_length=128)),
('last_login', models.DateTimeField(blank=True, verbose_name='last login', null=True)),
('is_superuser', models.BooleanField(verbose_name='superuser status', default=False, help_text='Designates that this user has all permissions without explicitly assigning them.')),
('username', models.CharField(verbose_name='username', max_length=254, error_messages={'unique': 'A user with that username already exists.'}, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], help_text='Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True)),
('last_login', models.DateTimeField(null=True, verbose_name='last login', blank=True)),
('username', models.CharField(verbose_name='username', error_messages={'unique': 'A user with that username already exists.'}, unique=True, max_length=254, help_text='Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.', validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')])),
('first_name', models.CharField(verbose_name='first name', max_length=30)),
('last_name', models.CharField(verbose_name='last name', max_length=30)),
('email', models.EmailField(verbose_name='email address', max_length=254, unique=True)),
('date_of_birth', models.DateField(verbose_name='date of birth')),
('nick_name', models.CharField(blank=True, max_length=30)),
('email', models.EmailField(max_length=254, verbose_name='email address', unique=True)),
('date_of_birth', models.DateField(null=True, verbose_name='date of birth', blank=True)),
('nick_name', models.CharField(max_length=30, blank=True)),
('is_staff', models.BooleanField(verbose_name='staff status', default=False, help_text='Designates whether the user can log into this admin site.')),
('is_active', models.BooleanField(verbose_name='active', default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.')),
('date_joined', models.DateField(verbose_name='date joined', auto_now_add=True)),
('is_superuser', models.BooleanField(verbose_name='superuser', default=False, help_text='Designates whether this user is a superuser. ')),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'permissions': (('change_prop_user', "Can change the user's properties (groups, ...)"), ('view_user', "Can view user's profile")),
'abstract': False,
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
@ -45,7 +43,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Group',
fields=[
('group_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, to='auth.Group', serialize=False)),
('group_ptr', models.OneToOneField(serialize=False, auto_created=True, to='auth.Group', primary_key=True, parent_link=True)),
('is_meta', models.BooleanField(verbose_name='meta group status', default=False, help_text='Whether a group is a meta group or not')),
('description', models.CharField(verbose_name='description', max_length=60)),
],
@ -54,13 +52,13 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Page',
fields=[
('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('name', models.CharField(verbose_name='page name', max_length=30)),
('_full_name', models.CharField(blank=True, verbose_name='page name', max_length=255)),
('edit_groups', models.ManyToManyField(blank=True, to='core.Group', related_name='editable_page')),
('owner_group', models.ForeignKey(default=1, related_name='owned_page', to='core.Group')),
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Page', related_name='children')),
('view_groups', models.ManyToManyField(blank=True, to='core.Group', related_name='viewable_page')),
('_full_name', models.CharField(verbose_name='page name', max_length=255, blank=True)),
('edit_groups', models.ManyToManyField(to='core.Group', verbose_name='edit group', related_name='editable_page', blank=True)),
('owner_group', models.ForeignKey(to='core.Group', default=1, related_name='owned_page', verbose_name='owner group')),
('parent', models.ForeignKey(to='core.Page', null=True, related_name='children', verbose_name='parent', blank=True, on_delete=django.db.models.deletion.SET_NULL)),
('view_groups', models.ManyToManyField(to='core.Group', verbose_name='view group', related_name='viewable_page', blank=True)),
],
options={
'permissions': (('change_prop_page', "Can change the page's properties (groups, ...)"), ('view_page', 'Can view the page')),
@ -69,41 +67,44 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='PageRev',
fields=[
('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
('title', models.CharField(blank=True, verbose_name='page title', max_length=255)),
('content', models.TextField(blank=True, verbose_name='page content')),
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('revision', models.IntegerField(verbose_name='revision')),
('title', models.CharField(verbose_name='page title', max_length=255, blank=True)),
('content', models.TextField(verbose_name='page content', blank=True)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('author', models.ForeignKey(related_name='page_rev', to=settings.AUTH_USER_MODEL)),
('page', models.ForeignKey(related_name='revisions', to='core.Page')),
('author', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='page_rev')),
('page', models.ForeignKey(to='core.Page', related_name='revisions')),
],
options={
'ordering': ['date'],
},
),
migrations.AddField(
model_name='user',
name='edit_groups',
field=models.ManyToManyField(blank=True, to='core.Group', related_name='editable_user'),
migrations.CreateModel(
name='Preferences',
fields=[
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('show_my_stats', models.BooleanField(verbose_name='define if we show a users stats', default=False, help_text='Show your account statistics to others')),
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, related_name='preferences')),
],
),
migrations.AddField(
model_name='user',
name='groups',
field=models.ManyToManyField(blank=True, verbose_name='groups', related_name='user_set', related_query_name='user', to='auth.Group', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.'),
),
migrations.AddField(
model_name='user',
name='owner_group',
field=models.ForeignKey(default=1, related_name='owned_user', to='core.Group'),
),
migrations.AddField(
model_name='user',
name='user_permissions',
field=models.ManyToManyField(blank=True, verbose_name='user permissions', related_name='user_set', related_query_name='user', to='auth.Permission', help_text='Specific permissions for this user.'),
),
migrations.AddField(
model_name='user',
name='view_groups',
field=models.ManyToManyField(blank=True, to='core.Group', related_name='viewable_user'),
migrations.CreateModel(
name='SithFile',
fields=[
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('name', models.CharField(verbose_name='file name', max_length=30)),
('file', models.FileField(null=True, upload_to=core.models.get_directory, verbose_name='file', blank=True)),
('is_folder', models.BooleanField(verbose_name='is folder', default=True)),
('mime_type', models.CharField(verbose_name='mime type', max_length=30)),
('size', models.IntegerField(verbose_name='size', default=0)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('edit_groups', models.ManyToManyField(to='core.Group', verbose_name='edit group', related_name='editable_files', blank=True)),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='owned_files', verbose_name='owner')),
('parent', models.ForeignKey(to='core.SithFile', null=True, related_name='children', verbose_name='parent', blank=True)),
('view_groups', models.ManyToManyField(to='core.Group', verbose_name='view group', related_name='viewable_files', blank=True)),
],
options={
'verbose_name': 'file',
},
),
migrations.CreateModel(
name='MetaGroup',
@ -133,4 +134,9 @@ class Migration(migrations.Migration):
name='page',
unique_together=set([('name', 'parent')]),
),
migrations.AddField(
model_name='user',
name='groups',
field=models.ManyToManyField(to='core.RealGroup', related_name='users', blank=True),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='date_of_birth',
field=models.DateField(verbose_name='date of birth', blank=True),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20160705_2303'),
]
operations = [
migrations.AlterField(
model_name='user',
name='date_of_birth',
field=models.DateField(null=True, blank=True, verbose_name='date of birth'),
),
]

View File

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20160705_2304'),
]
operations = [
migrations.CreateModel(
name='Preferences',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('show_my_stats', models.BooleanField(verbose_name='define if we show a users stats', default=False, help_text='Show your account statistics to others')),
('user', models.OneToOneField(related_name='preferences', to=settings.AUTH_USER_MODEL)),
],
),
]

View File

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0004_preferences'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='edit_groups',
),
migrations.RemoveField(
model_name='user',
name='owner_group',
),
migrations.RemoveField(
model_name='user',
name='view_groups',
),
]

View File

@ -1,31 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20160717_1459'),
]
operations = [
migrations.AlterModelOptions(
name='user',
options={},
),
migrations.RemoveField(
model_name='user',
name='is_superuser',
),
migrations.RemoveField(
model_name='user',
name='user_permissions',
),
migrations.AlterField(
model_name='user',
name='groups',
field=models.ManyToManyField(blank=True, to='core.RealGroup', related_name='users'),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20160717_1506'),
]
operations = [
migrations.AddField(
model_name='user',
name='is_superuser',
field=models.BooleanField(help_text='Designates whether this user is a superuser. ', default=False, verbose_name='superuser'),
),
]

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0007_user_is_superuser'),
]
operations = [
migrations.AddField(
model_name='pagerev',
name='revision',
field=models.IntegerField(default=1, verbose_name='revision'),
preserve_default=False,
),
]

View File

@ -1,56 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import core.models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('core', '0008_pagerev_revision'),
]
operations = [
migrations.CreateModel(
name='SithFile',
fields=[
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
('name', models.CharField(max_length=30, verbose_name='file name')),
('file', models.FileField(upload_to=core.models.get_directory, blank=True, null=True, verbose_name='file')),
('is_folder', models.BooleanField(default=True, verbose_name='is folder')),
('mime_type', models.CharField(max_length=30, verbose_name='mime type')),
('size', models.IntegerField(default=0, verbose_name='size')),
('date', models.DateTimeField(auto_now=True, verbose_name='date')),
('edit_groups', models.ManyToManyField(to='core.Group', blank=True, verbose_name='edit group', related_name='editable_files')),
('owner', models.ForeignKey(related_name='owned_files', to=settings.AUTH_USER_MODEL, verbose_name='owner')),
('parent', models.ForeignKey(blank=True, related_name='children', to='core.SithFile', null=True, verbose_name='parent')),
('view_groups', models.ManyToManyField(to='core.Group', blank=True, verbose_name='view group', related_name='viewable_files')),
],
options={
'verbose_name': 'file',
},
),
migrations.AlterField(
model_name='page',
name='edit_groups',
field=models.ManyToManyField(to='core.Group', blank=True, verbose_name='edit group', related_name='editable_page'),
),
migrations.AlterField(
model_name='page',
name='owner_group',
field=models.ForeignKey(default=1, related_name='owned_page', to='core.Group', verbose_name='owner group'),
),
migrations.AlterField(
model_name='page',
name='parent',
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, related_name='children', to='core.Page', null=True, verbose_name='parent'),
),
migrations.AlterField(
model_name='page',
name='view_groups',
field=models.ManyToManyField(to='core.Group', blank=True, verbose_name='view group', related_name='viewable_page'),
),
]

View File

@ -9,8 +9,9 @@ from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('club', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('core', '0001_initial'),
('club', '0001_initial'),
]
operations = [
@ -18,59 +19,113 @@ class Migration(migrations.Migration):
name='Counter',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('type', models.CharField(choices=[('BAR', 'Bar'), ('OFFICE', 'Office')], max_length=255, verbose_name='subscription type')),
('club', models.ForeignKey(to='club.Club', related_name='counters')),
('edit_groups', models.ManyToManyField(related_name='editable_counters', to='core.Group', blank=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('type', models.CharField(verbose_name='subscription type', max_length=255, choices=[('BAR', 'Bar'), ('OFFICE', 'Office'), ('EBOUTIC', 'Eboutic')])),
('club', models.ForeignKey(related_name='counters', to='club.Club')),
('edit_groups', models.ManyToManyField(to='core.Group', related_name='editable_counters', blank=True)),
],
options={
'verbose_name': 'counter',
},
),
migrations.CreateModel(
name='Customer',
fields=[
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, primary_key=True, serialize=False)),
('account_id', models.CharField(unique=True, max_length=10, verbose_name='account id')),
('user', models.OneToOneField(primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
('account_id', models.CharField(verbose_name='account id', unique=True, max_length=10)),
('amount', accounting.models.CurrencyField(verbose_name='amount', decimal_places=2, max_digits=12)),
],
options={
'verbose_name_plural': 'customers',
'verbose_name': 'customer',
'verbose_name_plural': 'customers',
'ordering': ['account_id'],
},
),
migrations.CreateModel(
name='Permanency',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('start', models.DateTimeField(verbose_name='start date')),
('end', models.DateTimeField(verbose_name='end date')),
('counter', models.ForeignKey(related_name='permanencies', to='counter.Counter')),
('user', models.ForeignKey(related_name='permanencies', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'permanency',
},
),
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('description', models.TextField(blank=True, verbose_name='description')),
('code', models.CharField(max_length=10, verbose_name='code')),
('purchase_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='purchase price')),
('selling_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='selling price')),
('special_selling_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='special selling price')),
('icon', models.ImageField(blank=True, upload_to='products', null=True)),
('club', models.ForeignKey(to='club.Club', related_name='products')),
('name', models.CharField(verbose_name='name', max_length=30)),
('description', models.TextField(verbose_name='description', blank=True)),
('code', models.CharField(verbose_name='code', max_length=10)),
('purchase_price', accounting.models.CurrencyField(verbose_name='purchase price', decimal_places=2, max_digits=12)),
('selling_price', accounting.models.CurrencyField(verbose_name='selling price', decimal_places=2, max_digits=12)),
('special_selling_price', accounting.models.CurrencyField(verbose_name='special selling price', decimal_places=2, max_digits=12)),
('icon', models.ImageField(upload_to='products', null=True, blank=True)),
('club', models.ForeignKey(related_name='products', to='club.Club')),
],
options={
'verbose_name': 'product',
},
),
migrations.CreateModel(
name='ProductType',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(max_length=30, verbose_name='name')),
('description', models.TextField(blank=True, verbose_name='description', null=True)),
('icon', models.ImageField(blank=True, upload_to='products', null=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('description', models.TextField(verbose_name='description', null=True, blank=True)),
('icon', models.ImageField(upload_to='products', null=True, blank=True)),
],
options={
'verbose_name': 'product type',
},
),
migrations.CreateModel(
name='Refilling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('amount', accounting.models.CurrencyField(verbose_name='amount', decimal_places=2, max_digits=12)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('payment_method', models.CharField(default='cash', verbose_name='payment method', max_length=255, choices=[('CHEQUE', 'Check'), ('CASH', 'Cash')])),
('bank', models.CharField(default='other', verbose_name='bank', max_length=255, choices=[('OTHER', 'Autre'), ('LA-POSTE', 'La Poste'), ('CREDIT-AGRICOLE', 'Credit Agricole'), ('CREDIT-MUTUEL', 'Credit Mutuel')])),
('is_validated', models.BooleanField(default=False, verbose_name='is validated')),
('counter', models.ForeignKey(related_name='refillings', to='counter.Counter')),
('customer', models.ForeignKey(related_name='refillings', to='counter.Customer')),
('operator', models.ForeignKey(related_name='refillings_as_operator', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'refilling',
},
),
migrations.CreateModel(
name='Selling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('label', models.CharField(verbose_name='label', max_length=30)),
('unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
('quantity', models.IntegerField(verbose_name='quantity')),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('is_validated', models.BooleanField(default=False, verbose_name='is validated')),
('counter', models.ForeignKey(related_name='sellings', to='counter.Counter')),
('customer', models.ForeignKey(related_name='buyings', to='counter.Customer')),
('product', models.ForeignKey(blank=True, null=True, to='counter.Product', related_name='sellings')),
('seller', models.ForeignKey(related_name='sellings_as_operator', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'selling',
},
),
migrations.AddField(
model_name='product',
name='product_type',
field=models.ForeignKey(to='counter.ProductType', related_name='products', null=True, blank=True),
field=models.ForeignKey(blank=True, null=True, to='counter.ProductType', related_name='products'),
),
migrations.AddField(
model_name='counter',
name='products',
field=models.ManyToManyField(related_name='counters', to='counter.Product', blank=True),
),
migrations.AddField(
model_name='counter',
name='view_groups',
field=models.ManyToManyField(related_name='viewable_counters', to='core.Group', blank=True),
field=models.ManyToManyField(to='counter.Product', related_name='counters', blank=True),
),
]

View File

@ -7,8 +7,9 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('subscription', '0002_auto_20160718_1805'),
('counter', '0010_auto_20160728_1820'),
('counter', '0001_initial'),
('core', '0001_initial'),
('subscription', '0001_initial'),
]
operations = [
@ -17,4 +18,9 @@ class Migration(migrations.Migration):
name='sellers',
field=models.ManyToManyField(verbose_name='sellers', to='subscription.Subscriber', related_name='counters', blank=True),
),
migrations.AddField(
model_name='counter',
name='view_groups',
field=models.ManyToManyField(to='core.Group', related_name='viewable_counters', blank=True),
),
]

View File

@ -1,42 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('counter', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Refilling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('amount', accounting.models.CurrencyField(verbose_name='amount', decimal_places=2, max_digits=12)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('payment_method', models.CharField(verbose_name='payment method', max_length=255, choices=[('cheque', 'Chèque'), ('cash', 'Espèce')])),
('counter', models.ForeignKey(to='counter.Counter', related_name='refillings')),
('customer', models.ForeignKey(to='counter.Customer', related_name='refill_customers')),
('operator', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='refill_operators')),
],
),
migrations.CreateModel(
name='Selling',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
('quantity', models.IntegerField(verbose_name='quantity')),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('counter', models.ForeignKey(to='counter.Counter', related_name='sellings')),
('customer', models.ForeignKey(to='counter.Customer', related_name='customers')),
('product', models.ForeignKey(to='counter.Product', related_name='sellings')),
('seller', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='sellers')),
],
),
]

View File

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
('counter', '0002_refilling_selling'),
]
operations = [
migrations.AddField(
model_name='customer',
name='amount',
field=accounting.models.CurrencyField(verbose_name='amount', default=0, decimal_places=2, max_digits=12),
preserve_default=False,
),
]

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0003_customer_amount'),
]
operations = [
migrations.AddField(
model_name='refilling',
name='bank',
field=models.CharField(verbose_name='bank', default='other', max_length=255, choices=[('other', 'Autre'), ('la-poste', 'La Poste'), ('credit-agricole', 'Credit Agricole'), ('credit-mutuel', 'Credit Mutuel')]),
),
migrations.AlterField(
model_name='refilling',
name='payment_method',
field=models.CharField(verbose_name='payment method', default='cash', max_length=255, choices=[('cheque', 'Chèque'), ('cash', 'Espèce')]),
),
]

View File

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('counter', '0004_auto_20160717_0933'),
]
operations = [
migrations.AlterField(
model_name='refilling',
name='customer',
field=models.ForeignKey(to='counter.Customer', related_name='refillings'),
),
migrations.AlterField(
model_name='refilling',
name='operator',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='refillings_as_operator'),
),
migrations.AlterField(
model_name='selling',
name='customer',
field=models.ForeignKey(to='counter.Customer', related_name='sellings'),
),
migrations.AlterField(
model_name='selling',
name='seller',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='sellings_as_operator'),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0005_auto_20160717_1029'),
]
operations = [
migrations.AlterField(
model_name='selling',
name='customer',
field=models.ForeignKey(to='counter.Customer', related_name='buyings'),
),
]

View File

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('counter', '0006_auto_20160717_1033'),
]
operations = [
migrations.CreateModel(
name='Permanency',
fields=[
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
('start', models.DateTimeField(verbose_name='start date')),
('end', models.DateTimeField(verbose_name='end date')),
('counter', models.ForeignKey(related_name='permanencies', to='counter.Counter')),
('user', models.ForeignKey(related_name='permanencies', to=settings.AUTH_USER_MODEL)),
],
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0007_permanency'),
]
operations = [
migrations.AlterField(
model_name='refilling',
name='payment_method',
field=models.CharField(max_length=255, verbose_name='payment method', default='cash', choices=[('cheque', 'Check'), ('cash', 'Cash')]),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0008_auto_20160718_1805'),
]
operations = [
migrations.AlterField(
model_name='counter',
name='type',
field=models.CharField(max_length=255, verbose_name='subscription type', choices=[('BAR', 'Bar'), ('OFFICE', 'Office'), ('EBOUTIC', 'Eboutic')]),
),
]

View File

@ -1,38 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0009_auto_20160721_1902'),
]
operations = [
migrations.AlterModelOptions(
name='counter',
options={'verbose_name': 'counter'},
),
migrations.AlterModelOptions(
name='permanency',
options={'verbose_name': 'permanency'},
),
migrations.AlterModelOptions(
name='product',
options={'verbose_name': 'product'},
),
migrations.AlterModelOptions(
name='producttype',
options={'verbose_name': 'product type'},
),
migrations.AlterModelOptions(
name='refilling',
options={'verbose_name': 'refilling'},
),
migrations.AlterModelOptions(
name='selling',
options={'verbose_name': 'selling'},
),
]

View File

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0011_counter_sellers'),
]
operations = [
migrations.AddField(
model_name='refilling',
name='is_validated',
field=models.BooleanField(default=False, verbose_name='is validated'),
),
migrations.AddField(
model_name='selling',
name='is_validated',
field=models.BooleanField(default=False, verbose_name='is validated'),
),
migrations.AddField(
model_name='selling',
name='label',
field=models.CharField(max_length=30, default='troll', verbose_name='label'),
preserve_default=False,
),
migrations.AlterField(
model_name='selling',
name='product',
field=models.ForeignKey(related_name='sellings', to='counter.Product', blank=True),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0012_auto_20160801_2016'),
]
operations = [
migrations.AlterField(
model_name='selling',
name='product',
field=models.ForeignKey(to='counter.Product', null=True, related_name='sellings', blank=True),
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0013_auto_20160801_2255'),
]
operations = [
migrations.AlterModelOptions(
name='customer',
options={'verbose_name': 'customer', 'ordering': ['account_id'], 'verbose_name_plural': 'customers'},
),
]

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0014_auto_20160804_1603'),
]
operations = [
migrations.AlterField(
model_name='refilling',
name='bank',
field=models.CharField(max_length=255, verbose_name='bank', choices=[('OTHER', 'Autre'), ('LA-POSTE', 'La Poste'), ('CREDIT-AGRICOLE', 'Credit Agricole'), ('CREDIT-MUTUEL', 'Credit Mutuel')], default='other'),
),
migrations.AlterField(
model_name='refilling',
name='payment_method',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('CHEQUE', 'Check'), ('CASH', 'Cash')], default='cash'),
),
]

View File

@ -2,32 +2,33 @@
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import accounting.models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('counter', '0009_auto_20160721_1902'),
]
operations = [
migrations.CreateModel(
name='Basket',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
('date', models.DateTimeField(auto_now=True, verbose_name='date')),
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('user', models.ForeignKey(verbose_name='user', related_name='baskets', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='BasketItem',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
('product_name', models.CharField(max_length=255, verbose_name='product name')),
('product_unit_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='unit price')),
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('product_id', models.IntegerField(verbose_name='product id')),
('product_name', models.CharField(verbose_name='product name', max_length=255)),
('type', models.CharField(verbose_name='product type', max_length=255)),
('product_unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
('quantity', models.IntegerField(verbose_name='quantity')),
('basket', models.ForeignKey(verbose_name='basket', related_name='items', to='eboutic.Basket')),
],
@ -38,19 +39,21 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Invoice',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
('date', models.DateTimeField(auto_now=True, verbose_name='date')),
('payment_method', models.CharField(max_length=20, choices=[('CREDIT_CARD', 'Credit card'), ('SITH_ACCOUNT', 'Sith account')], verbose_name='payment method')),
('products', models.ManyToManyField(related_name='invoices', to='counter.Product', blank=True, verbose_name='products')),
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('date', models.DateTimeField(verbose_name='date', auto_now=True)),
('payment_method', models.CharField(verbose_name='payment method', max_length=20, choices=[('CREDIT_CARD', 'Credit card'), ('SITH_ACCOUNT', 'Sith account')])),
('validated', models.BooleanField(default=False, verbose_name='validated')),
('user', models.ForeignKey(verbose_name='user', related_name='invoices', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='InvoiceItem',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
('product_name', models.CharField(max_length=255, verbose_name='product name')),
('product_unit_price', accounting.models.CurrencyField(max_digits=12, decimal_places=2, verbose_name='unit price')),
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('product_id', models.IntegerField(verbose_name='product id')),
('product_name', models.CharField(verbose_name='product name', max_length=255)),
('type', models.CharField(verbose_name='product type', max_length=255)),
('product_unit_price', accounting.models.CurrencyField(verbose_name='unit price', decimal_places=2, max_digits=12)),
('quantity', models.IntegerField(verbose_name='quantity')),
('invoice', models.ForeignKey(verbose_name='invoice', related_name='items', to='eboutic.Invoice')),
],
@ -58,13 +61,4 @@ class Migration(migrations.Migration):
'abstract': False,
},
),
migrations.CreateModel(
name='Eboutic',
fields=[
],
options={
'proxy': True,
},
bases=('counter.counter',),
),
]

View File

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('eboutic', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='invoice',
name='products',
),
migrations.AddField(
model_name='invoice',
name='validated',
field=models.BooleanField(default=False, verbose_name='validated'),
),
]

View File

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('eboutic', '0002_auto_20160722_0100'),
]
operations = [
migrations.DeleteModel(
name='Eboutic',
),
migrations.AddField(
model_name='basketitem',
name='type',
field=models.CharField(default='GUY', verbose_name='product type', max_length=255),
preserve_default=False,
),
migrations.AddField(
model_name='invoiceitem',
name='type',
field=models.CharField(default='GUY', verbose_name='product type', max_length=255),
preserve_default=False,
),
]

View File

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('eboutic', '0003_auto_20160726_1708'),
]
operations = [
migrations.AddField(
model_name='basketitem',
name='product_id',
field=models.IntegerField(verbose_name='product id', default=0),
preserve_default=False,
),
migrations.AddField(
model_name='invoiceitem',
name='product_id',
field=models.IntegerField(verbose_name='product id', default=0),
preserve_default=False,
),
]

View File

@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Launderette',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
],
options={
'verbose_name': 'Launderette',
},
),
migrations.CreateModel(
name='Machine',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(verbose_name='name', max_length=30)),
('type', models.CharField(verbose_name='type', max_length=10, choices=[('WASHING', 'Washing'), ('DRYING', 'Drying')])),
('is_working', models.BooleanField(default=True, verbose_name='is working')),
],
options={
'verbose_name': 'Machine',
},
),
migrations.CreateModel(
name='Slot',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('start_date', models.DateTimeField(verbose_name='start date')),
('type', models.CharField(verbose_name='type', max_length=10, choices=[('WASHING', 'Washing'), ('DRYING', 'Drying')])),
],
options={
'verbose_name': 'Slot',
'ordering': ['start_date'],
},
),
migrations.CreateModel(
name='Token',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('name', models.CharField(verbose_name='name', max_length=5)),
('type', models.CharField(verbose_name='type', max_length=10, choices=[('WASHING', 'Washing'), ('DRYING', 'Drying')])),
('borrow_date', models.DateTimeField(verbose_name='borrow date', null=True, blank=True)),
('launderette', models.ForeignKey(verbose_name='launderette', related_name='tokens', to='launderette.Launderette')),
],
options={
'verbose_name': 'Token',
'ordering': ['type', 'name'],
},
),
]

View File

@ -1,66 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
replaces = [('launderette', '0001_initial'), ('launderette', '0002_auto_20160728_1858'), ('launderette', '0003_launderette_sellers'), ('launderette', '0004_auto_20160728_1922'), ('launderette', '0005_auto_20160729_0049'), ('launderette', '0006_auto_20160729_0050')]
dependencies = [
('subscription', '0002_auto_20160718_1805'),
]
operations = [
migrations.CreateModel(
name='Launderette',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
('name', models.CharField(verbose_name='name', max_length=30)),
],
options={
'verbose_name': 'Launderette',
},
),
migrations.CreateModel(
name='Machine',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
('name', models.CharField(verbose_name='name', max_length=30)),
('is_working', models.BooleanField(verbose_name='is working', default=True)),
('launderette', models.ForeignKey(related_name='machines', verbose_name='launderette', to='launderette.Launderette')),
],
options={
'verbose_name': 'Machine',
},
),
migrations.CreateModel(
name='Token',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
('name', models.IntegerField(verbose_name='name')),
('type', models.CharField(verbose_name='type', choices=[('WASHING', 'Washing'), ('DRYING', 'Drying')], max_length=10)),
('launderette', models.ForeignKey(related_name='tokens', verbose_name='launderette', to='launderette.Launderette')),
],
options={
'verbose_name': 'Token',
},
),
migrations.CreateModel(
name='Slot',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
('start_date', models.DateTimeField(verbose_name='start date')),
('type', models.CharField(verbose_name='type', choices=[('WASHING', 'Washing'), ('DRYING', 'Drying')], max_length=10)),
('machine', models.ForeignKey(related_name='slots', verbose_name='machine', to='launderette.Machine')),
('token', models.ForeignKey(related_name='slots', null=True, verbose_name='token', blank=True, to='launderette.Token')),
('user', models.ForeignKey(related_name='slots', verbose_name='user', to='subscription.Subscriber')),
],
),
migrations.AddField(
model_name='launderette',
name='sellers',
field=models.ManyToManyField(verbose_name='sellers', related_name='launderettes', blank=True, to='subscription.Subscriber'),
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0001_squashed_0006_auto_20160729_0050'),
]
operations = [
migrations.AlterModelOptions(
name='slot',
options={'verbose_name': 'Slot'},
),
]

View File

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0001_initial'),
('counter', '0001_initial'),
('subscription', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='token',
name='user',
field=models.ForeignKey(verbose_name='user', null=True, to='subscription.Subscriber', related_name='tokens', blank=True),
),
migrations.AddField(
model_name='slot',
name='machine',
field=models.ForeignKey(verbose_name='machine', related_name='slots', to='launderette.Machine'),
),
migrations.AddField(
model_name='slot',
name='token',
field=models.ForeignKey(verbose_name='token', null=True, to='launderette.Token', related_name='slots', blank=True),
),
migrations.AddField(
model_name='slot',
name='user',
field=models.ForeignKey(verbose_name='user', related_name='slots', to='subscription.Subscriber'),
),
migrations.AddField(
model_name='machine',
name='launderette',
field=models.ForeignKey(verbose_name='launderette', related_name='machines', to='launderette.Launderette'),
),
migrations.AddField(
model_name='launderette',
name='counter',
field=models.OneToOneField(verbose_name='counter', related_name='launderette', to='counter.Counter'),
),
migrations.AlterUniqueTogether(
name='token',
unique_together=set([('name', 'launderette', 'type')]),
),
]

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0002_auto_20160729_0138'),
]
operations = [
migrations.AddField(
model_name='machine',
name='type',
field=models.CharField(choices=[('WASHING', 'Washing'), ('DRYING', 'Drying')], max_length=10, default='WASHING', verbose_name='type'),
preserve_default=False,
),
]

View File

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.utils.timezone import utc
import datetime
class Migration(migrations.Migration):
dependencies = [
('launderette', '0003_machine_type'),
]
operations = [
migrations.AddField(
model_name='token',
name='start_date',
field=models.DateTimeField(default=datetime.datetime(2016, 7, 29, 10, 46, 13, 675691, tzinfo=utc), verbose_name='start date'),
preserve_default=False,
),
]

View File

@ -1,54 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0011_counter_sellers'),
('subscription', '0002_auto_20160718_1805'),
('launderette', '0004_token_start_date'),
]
operations = [
migrations.AlterModelOptions(
name='slot',
options={'verbose_name': 'Slot', 'ordering': ['start_date']},
),
migrations.RemoveField(
model_name='launderette',
name='sellers',
),
migrations.AddField(
model_name='launderette',
name='counter',
field=models.OneToOneField(related_name='launderette', default=1, verbose_name='counter', to='counter.Counter'),
preserve_default=False,
),
migrations.AddField(
model_name='token',
name='borrow_date',
field=models.DateTimeField(null=True, verbose_name='borrow date'),
),
migrations.AddField(
model_name='token',
name='user',
field=models.ForeignKey(related_name='tokens', default=1, verbose_name='user', to='subscription.Subscriber'),
preserve_default=False,
),
migrations.AlterField(
model_name='token',
name='name',
field=models.CharField(max_length=5, verbose_name='name'),
),
migrations.AlterUniqueTogether(
name='token',
unique_together=set([('name', 'launderette', 'type')]),
),
migrations.RemoveField(
model_name='token',
name='start_date',
),
]

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0005_auto_20160801_1634'),
]
operations = [
migrations.AlterField(
model_name='token',
name='borrow_date',
field=models.DateTimeField(blank=True, verbose_name='borrow date', null=True),
),
migrations.AlterField(
model_name='token',
name='user',
field=models.ForeignKey(blank=True, to='subscription.Subscriber', related_name='tokens', verbose_name='user'),
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0006_auto_20160801_1928'),
]
operations = [
migrations.AlterField(
model_name='token',
name='user',
field=models.ForeignKey(verbose_name='user', related_name='tokens', blank=True, null=True, to='subscription.Subscriber'),
),
]

View File

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0011_counter_sellers'),
('launderette', '0007_auto_20160801_1929'),
]
operations = [
migrations.AddField(
model_name='token',
name='product',
field=models.ForeignKey(related_name='tokens', to='counter.Product', default=1, verbose_name='product'),
preserve_default=False,
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0008_token_product'),
]
operations = [
migrations.RemoveField(
model_name='token',
name='product',
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0009_remove_token_product'),
]
operations = [
migrations.AlterModelOptions(
name='token',
options={'verbose_name': 'Token', 'ordering': ['name']},
),
]

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('launderette', '0010_auto_20160806_1242'),
]
operations = [
migrations.AlterModelOptions(
name='token',
options={'ordering': ['type', 'name'], 'verbose_name': 'Token'},
),
]

View File

@ -16,10 +16,11 @@ class Migration(migrations.Migration):
name='Subscription',
fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('subscription_type', models.CharField(choices=[('cursus-branche', 'Cursus Branche'), ('cursus-tronc-commun', 'Cursus Tronc Commun'), ('deux-semestres', 'Deux semestres'), ('un-semestre', 'Un semestre')], max_length=255, verbose_name='subscription type')),
('subscription_type', models.CharField(verbose_name='subscription type', max_length=255, choices=[('cursus-branche', 'Branch cursus'), ('cursus-tronc-commun', 'Common core cursus'), ('deux-semestres', 'Two semesters'), ('un-semestre', 'One semester')])),
('subscription_start', models.DateField(verbose_name='subscription start')),
('subscription_end', models.DateField(verbose_name='subscription end')),
('payment_method', models.CharField(choices=[('cheque', 'Chèque'), ('cash', 'Espèce'), ('other', 'Autre')], max_length=255, verbose_name='payment method')),
('payment_method', models.CharField(verbose_name='payment method', max_length=255, choices=[('CHEQUE', 'Check'), ('CASH', 'Cash'), ('OTHER', 'Other')])),
('location', models.CharField(verbose_name='location', max_length=20, choices=[('BELFORT', 'Belfort'), ('SEVENANS', 'Sevenans'), ('MONTBELIARD', 'Montbéliard')])),
],
options={
'ordering': ['subscription_start'],
@ -40,6 +41,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='subscription',
name='member',
field=models.ForeignKey(to='subscription.Subscriber', related_name='subscriptions'),
field=models.ForeignKey(related_name='subscriptions', to='subscription.Subscriber'),
),
]

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('subscription', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='subscription',
name='payment_method',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('cheque', 'Check'), ('cash', 'Cash'), ('other', 'Other')]),
),
migrations.AlterField(
model_name='subscription',
name='subscription_type',
field=models.CharField(max_length=255, verbose_name='subscription type', choices=[('cursus-branche', 'Branch cursus'), ('cursus-tronc-commun', 'Common core cursus'), ('deux-semestres', 'Two semesters'), ('un-semestre', 'One semester')]),
),
]

View File

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('subscription', '0002_auto_20160718_1805'),
]
operations = [
migrations.AddField(
model_name='subscription',
name='location',
field=models.CharField(max_length=20, verbose_name='location', choices=[('BELFORT', 'Belfort'), ('SEVENANS', 'Sevenans'), ('MONTBELIARD', 'Montbéliard')], default='BELFORT'),
preserve_default=False,
),
]

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('subscription', '0003_subscription_location'),
]
operations = [
migrations.AlterField(
model_name='subscription',
name='payment_method',
field=models.CharField(max_length=255, verbose_name='payment method', choices=[('CHEQUE', 'Check'), ('CASH', 'Cash'), ('OTHER', 'Other')]),
),
]