mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Validate uniqueness for StockItems
- If the Part is a variant of a template, ensure that the serial numbers are unique across all instances of the template - Prevent instantiation of a StockItem for a part which has variants
This commit is contained in:
19
InvenTree/stock/migrations/0003_auto_20190525_2303.py
Normal file
19
InvenTree/stock/migrations/0003_auto_20190525_2303.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 2.2 on 2019-05-25 13:03
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0002_auto_20190525_2226'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='part',
|
||||
field=models.ForeignKey(help_text='Base part', limit_choices_to={'active': True, 'has_variants': False}, on_delete=django.db.models.deletion.CASCADE, related_name='stock_items', to='part.Part'),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user