diff --git a/src/backend/InvenTree/part/migrations/0151_part_consumable.py b/src/backend/InvenTree/part/migrations/0151_part_consumable.py new file mode 100644 index 0000000000..673313e25e --- /dev/null +++ b/src/backend/InvenTree/part/migrations/0151_part_consumable.py @@ -0,0 +1,22 @@ +# Generated by Django 5.2.15 on 2026-07-02 07:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("part", "0150_part_maximum_stock"), + ] + + operations = [ + migrations.AddField( + model_name="part", + name="consumable", + field=models.BooleanField( + default=False, + help_text="Is this part consumable, such as glue or a fastener?", + verbose_name="Consumable", + ), + ), + ] diff --git a/src/backend/InvenTree/part/models.py b/src/backend/InvenTree/part/models.py index 876b5e521b..9cc2c4295a 100644 --- a/src/backend/InvenTree/part/models.py +++ b/src/backend/InvenTree/part/models.py @@ -503,6 +503,7 @@ class Part( active: Is this part active? Parts are deactivated instead of being deleted locked: This part is locked and cannot be edited virtual: Is this part "virtual"? e.g. a software product or similar + consumable: Is this part consumable, such as glue or a fastener? notes: Additional notes field for this part creation_date: Date that this part was added to the database creation_user: User who added this part to the database @@ -1308,6 +1309,12 @@ class Part( help_text=_('Is this a virtual part, such as a software product or license?'), ) + consumable = models.BooleanField( + default=False, + verbose_name=_('Consumable'), + help_text=_('Is this part consumable, such as glue or a fastener?'), + ) + bom_validated = models.BooleanField( default=False, verbose_name=_('BOM Validated'), diff --git a/src/backend/InvenTree/part/serializers.py b/src/backend/InvenTree/part/serializers.py index a9a87c7e80..051abd27a1 100644 --- a/src/backend/InvenTree/part/serializers.py +++ b/src/backend/InvenTree/part/serializers.py @@ -357,6 +357,7 @@ class PartBriefSerializer( 'testable', 'trackable', 'virtual', + 'consumable', 'units', 'pricing_min', 'pricing_max', @@ -649,6 +650,7 @@ class PartSerializer( 'units', 'variant_of', 'virtual', + 'consumable', 'pricing_min', 'pricing_max', 'pricing_updated',