mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Add MetaGroup system
This commit is contained in:
@ -16,20 +16,20 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='Customer',
|
||||
fields=[
|
||||
('user', models.OneToOneField(primary_key=True, to=settings.AUTH_USER_MODEL, serialize=False)),
|
||||
('account_id', models.CharField(max_length=10, unique=True, verbose_name='account id')),
|
||||
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, serialize=False, primary_key=True)),
|
||||
('account_id', models.CharField(max_length=10, verbose_name='account id', unique=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'customers',
|
||||
'verbose_name': 'customer',
|
||||
'verbose_name_plural': 'customers',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='GeneralJournal',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||
('start_date', models.DateField(verbose_name='start date')),
|
||||
('end_date', models.DateField(blank=True, default=None, null=True, verbose_name='end date')),
|
||||
('end_date', models.DateField(default=None, blank=True, null=True, verbose_name='end date')),
|
||||
('name', models.CharField(max_length=30, verbose_name='name')),
|
||||
('closed', models.BooleanField(default=False, verbose_name='is closed')),
|
||||
],
|
||||
@ -37,36 +37,36 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='GenericInvoice',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||
('name', models.CharField(max_length=100, verbose_name='name')),
|
||||
('journal', models.ForeignKey(related_name='invoices', to='accounting.GeneralJournal')),
|
||||
('journal', models.ForeignKey(to='accounting.GeneralJournal', related_name='invoices')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Product',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', 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(decimal_places=2, max_digits=12, verbose_name='purchase price')),
|
||||
('selling_price', accounting.models.CurrencyField(decimal_places=2, max_digits=12, verbose_name='selling price')),
|
||||
('special_selling_price', accounting.models.CurrencyField(decimal_places=2, max_digits=12, verbose_name='special selling price')),
|
||||
('icon', models.ImageField(blank=True, upload_to='products', null=True)),
|
||||
('purchase_price', accounting.models.CurrencyField(max_digits=12, verbose_name='purchase price', decimal_places=2)),
|
||||
('selling_price', accounting.models.CurrencyField(max_digits=12, verbose_name='selling price', decimal_places=2)),
|
||||
('special_selling_price', accounting.models.CurrencyField(max_digits=12, verbose_name='special selling price', decimal_places=2)),
|
||||
('icon', models.ImageField(upload_to='products', blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ProductType',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||
('name', models.CharField(max_length=30, verbose_name='name')),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='description')),
|
||||
('icon', models.ImageField(blank=True, upload_to='products', null=True)),
|
||||
('icon', models.ImageField(upload_to='products', blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='product_type',
|
||||
field=models.ForeignKey(related_name='products', blank=True, to='accounting.ProductType', null=True),
|
||||
field=models.ForeignKey(blank=True, related_name='products', to='accounting.ProductType', null=True),
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user