From 3bb434ae98359e9dad3f81e3af4df782f6f8e939 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 19 Apr 2018 08:31:31 +1000 Subject: [PATCH] Migration fix --- InvenTree/stock/migrations/0013_auto_20180417_1337.py | 2 +- InvenTree/stock/models.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/stock/migrations/0013_auto_20180417_1337.py b/InvenTree/stock/migrations/0013_auto_20180417_1337.py index 5f4b64b873..6ad54b4eb0 100644 --- a/InvenTree/stock/migrations/0013_auto_20180417_1337.py +++ b/InvenTree/stock/migrations/0013_auto_20180417_1337.py @@ -16,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='stockitem', name='customer', - field=models.ForeignKey(blank=True, help_text='Item assigned to customer?', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stockitems', to='customer.Customer'), + field=models.ForeignKey(blank=True, help_text='Item assigned to customer?', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stockitems', to='supplier.Supplier'), ), ] diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 5a21c192ee..8d3aeb60df 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -83,9 +83,9 @@ class StockItem(models.Model): # TODO - Point to a Company object instead # The StockItem may be assigned to a particular customer - #customer = models.ForeignKey(Customer, on_delete=models.SET_NULL, - # related_name='stockitems', blank=True, null=True, - # help_text='Item assigned to customer?') + customer = models.ForeignKey('supplier.Supplier', on_delete=models.SET_NULL, + related_name='stockitems', blank=True, null=True, + help_text='Item assigned to customer?') # Optional serial number serial = models.PositiveIntegerField(blank=True, null=True,