parachève la transformation des ingrédients
This commit is contained in:
parent
01685b0bf7
commit
ee076ef6d7
@ -262,7 +262,7 @@ class FournéeAdmin(nested_admin.NestedModelAdmin):
|
||||
|
||||
""" on créé un tableau total coulée / ingrédient """
|
||||
ingrédients = [
|
||||
models.Fourniture.objects.filter(nom=nom).first()
|
||||
models.Fourniture.objects.get(nom=nom)
|
||||
for nom in set(
|
||||
coulées.values_list(
|
||||
"pâte__ingrédient__fourniture__nom", flat=True
|
||||
|
@ -0,0 +1,24 @@
|
||||
# Generated by Django 4.2.13 on 2024-05-14 08:19
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("core", "0010_alter_ingrédient_fourniture"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name="ingrédient",
|
||||
name="couleur",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="ingrédient",
|
||||
name="nom",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="ingrédient",
|
||||
name="ordre",
|
||||
),
|
||||
]
|
18
fournée/core/migrations/0012_fourniture_conditionnement.py
Normal file
18
fournée/core/migrations/0012_fourniture_conditionnement.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.13 on 2024-05-14 10:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("core", "0011_remove_ingrédient_couleur_remove_ingrédient_nom_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="fourniture",
|
||||
name="conditionnement",
|
||||
field=models.DecimalField(decimal_places=3, default=0, max_digits=6),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
17
fournée/core/migrations/0013_alter_fourniture_nom.py
Normal file
17
fournée/core/migrations/0013_alter_fourniture_nom.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Generated by Django 4.2.13 on 2024-05-14 10:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("core", "0012_fourniture_conditionnement"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="fourniture",
|
||||
name="nom",
|
||||
field=models.CharField(max_length=64, unique=True),
|
||||
),
|
||||
]
|
@ -30,7 +30,7 @@ class Fourniture(models.Model):
|
||||
class Meta:
|
||||
ordering = ["ordre"]
|
||||
|
||||
nom = models.CharField(max_length=64)
|
||||
nom = models.CharField(max_length=64, unique=True)
|
||||
ordre = models.SmallIntegerField(default=0)
|
||||
couleur = ColorField(default='#000000')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user