2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Fix for StockItem model

- Allow sales_order_line to be blank
This commit is contained in:
Oliver Walters
2020-04-22 10:16:54 +10:00
parent 6dd79af0b6
commit 3a71a4f63a
3 changed files with 32 additions and 7 deletions

View File

@ -0,0 +1,20 @@
# Generated by Django 3.0.5 on 2020-04-22 00:15
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('order', '0023_auto_20200420_2309'),
('stock', '0029_auto_20200421_2359'),
]
operations = [
migrations.AlterField(
model_name='stockitem',
name='sales_order_line',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stock_items', to='order.SalesOrderLineItem'),
),
]

View File

@ -373,7 +373,7 @@ class StockItem(MPTTModel):
SalesOrderLineItem,
on_delete=models.SET_NULL,
related_name='stock_items',
null=True)
null=True, blank=True)
# last time the stock was checked / counted
stocktake_date = models.DateField(blank=True, null=True)