Add 'serial_int' field to stockitem model

- Allows for integer sorting of stock items
This commit is contained in:
Oliver 2021-11-10 10:47:17 +11:00
parent 85b906f49d
commit 257be18d79
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.5 on 2021-11-09 23:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stock', '0067_alter_stockitem_part'),
]
operations = [
migrations.AddField(
model_name='stockitem',
name='serial_int',
field=models.IntegerField(default=0),
),
]

View File

@ -504,6 +504,8 @@ class StockItem(MPTTModel):
help_text=_('Serial number for this item')
)
serial_int = models.IntegerField(default=0)
link = InvenTreeURLField(
verbose_name=_('External Link'),
max_length=125, blank=True,