2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 19:15:41 +00:00
Oliver Walters
2019-05-18 18:04:25 +10:00
parent 5043c354b1
commit 0cfb243eb3
21 changed files with 550 additions and 422 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 2.2 on 2019-05-18 07:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('stock', '0016_auto_20190512_2119'),
]
operations = [
migrations.AlterField(
model_name='stockitem',
name='supplier_part',
field=models.ForeignKey(blank=True, help_text='Select a matching supplier part for this stock item', null=True, on_delete=django.db.models.deletion.SET_NULL, to='company.SupplierPart'),
),
]

View File

@ -22,6 +22,7 @@ from InvenTree import helpers
from InvenTree.models import InvenTreeTree
from part.models import Part
from company.models import SupplierPart
class StockLocation(InvenTreeTree):
@ -188,7 +189,7 @@ class StockItem(models.Model):
part = models.ForeignKey('part.Part', on_delete=models.CASCADE, related_name='locations', help_text='Base part')
supplier_part = models.ForeignKey('part.SupplierPart', blank=True, null=True, on_delete=models.SET_NULL,
supplier_part = models.ForeignKey(SupplierPart, blank=True, null=True, on_delete=models.SET_NULL,
help_text='Select a matching supplier part for this stock item')
location = models.ForeignKey(StockLocation, on_delete=models.DO_NOTHING,