mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 12:05:53 +00:00
Update definition for StockItemAllocation model
- Limit foreignkey choices - Error checking - Check if a StockItem is over-allocated - Fix API serialization and filtering
This commit is contained in:
18
InvenTree/order/migrations/0025_auto_20200422_0222.py
Normal file
18
InvenTree/order/migrations/0025_auto_20200422_0222.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-22 02:22
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0031_auto_20200422_0209'),
|
||||
('order', '0024_salesorderallocation'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='salesorderallocation',
|
||||
unique_together={('line', 'item')},
|
||||
),
|
||||
]
|
20
InvenTree/order/migrations/0026_auto_20200422_0224.py
Normal file
20
InvenTree/order/migrations/0026_auto_20200422_0224.py
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-22 02:24
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0031_auto_20200422_0209'),
|
||||
('order', '0025_auto_20200422_0222'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='salesorderallocation',
|
||||
name='item',
|
||||
field=models.OneToOneField(limit_choices_to={'part__salable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='sales_order_allocation', to='stock.StockItem'),
|
||||
),
|
||||
]
|
20
InvenTree/order/migrations/0027_auto_20200422_0236.py
Normal file
20
InvenTree/order/migrations/0027_auto_20200422_0236.py
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated by Django 3.0.5 on 2020-04-22 02:36
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0031_auto_20200422_0209'),
|
||||
('order', '0026_auto_20200422_0224'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='salesorderallocation',
|
||||
name='item',
|
||||
field=models.ForeignKey(limit_choices_to={'part__salable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='sales_order_allocations', to='stock.StockItem'),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user