From f42116c0d9d107a5a48028ac411730f60dbc158a Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 29 Apr 2019 22:33:39 +1000 Subject: [PATCH] Renamed 'stock' to 'stock_item' --- .../migrations/0006_auto_20190429_2233.py | 18 ++++++++++++++++++ InvenTree/build/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 InvenTree/build/migrations/0006_auto_20190429_2233.py diff --git a/InvenTree/build/migrations/0006_auto_20190429_2233.py b/InvenTree/build/migrations/0006_auto_20190429_2233.py new file mode 100644 index 0000000000..5d03e13b75 --- /dev/null +++ b/InvenTree/build/migrations/0006_auto_20190429_2233.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2 on 2019-04-29 12:33 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('build', '0005_auto_20190429_2229'), + ] + + operations = [ + migrations.RenameField( + model_name='builditem', + old_name='stock', + new_name='stock_item', + ), + ] diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index a164db50ee..d0c3bbee03 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -134,7 +134,7 @@ class BuildItem(models.Model): related_name='allocated_stock', ) - stock = models.ForeignKey( + stock_item = models.ForeignKey( 'stock.StockItem', on_delete=models.CASCADE, related_name='allocations',