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,