change bug of permissions list

This commit is contained in:
2025-06-08 14:36:57 +03:30
parent e0355fff9a
commit 3e2375582c
9 changed files with 398 additions and 10 deletions

View File

@@ -0,0 +1,47 @@
# Generated by Django 5.0 on 2025-06-08 07:32
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authorization', '0016_alter_permissions_name'),
('product', '0003_saleunit'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterField(
model_name='attribute',
name='type',
field=models.CharField(choices=[('K', 'Per Kilo'), ('', '')], default='empty', help_text='type of attribute like: calculate product by kilogram', max_length=10),
),
migrations.AlterField(
model_name='attributevalue',
name='attribute',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='attribute_value', to='product.attribute'),
),
migrations.CreateModel(
name='Broker',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('create_date', models.DateTimeField(auto_now_add=True)),
('modify_date', models.DateTimeField(auto_now=True)),
('creator_info', models.CharField(max_length=100, null=True)),
('modifier_info', models.CharField(max_length=100, null=True)),
('trash', models.BooleanField(default=False)),
('calculation_strategy', models.CharField(choices=[('K', 'Per Kilo'), ('', '')], default='empty', max_length=3)),
('required', models.BooleanField(default=False)),
('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_createddby', to=settings.AUTH_USER_MODEL)),
('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modifiedby', to=settings.AUTH_USER_MODEL)),
('organization_relations', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_organization', to='authorization.userrelations')),
('reference_product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_broker', to='product.referenceproduct')),
],
options={
'abstract': False,
},
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0 on 2025-06-08 08:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('product', '0004_alter_attribute_type_alter_attributevalue_attribute_and_more'),
]
operations = [
migrations.RenameField(
model_name='saleunit',
old_name='product',
new_name='reference_product',
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.0 on 2025-06-08 08:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0005_rename_product_saleunit_reference_product'),
]
operations = [
migrations.AlterField(
model_name='saleunit',
name='unit',
field=models.CharField(choices=[('10P', '10KG Package'), ('50P', '50KG Package'), ('', '')], max_length=10, null=True),
),
migrations.AlterField(
model_name='saleunit',
name='variation_coefficient',
field=models.IntegerField(default=0),
),
]