diff --git a/InvenTree/part/migrations/0009_auto_20190417_0019.py b/InvenTree/part/migrations/0009_auto_20190417_0019.py new file mode 100644 index 0000000000..2a6eba4960 --- /dev/null +++ b/InvenTree/part/migrations/0009_auto_20190417_0019.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2 on 2019-04-16 14:19 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0008_auto_20190417_0013'), + ] + + operations = [ + migrations.AlterField( + model_name='supplierpart', + name='part', + field=models.ForeignKey(limit_choices_to={'purchaseable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='supplier_parts', to='part.Part'), + ), + ] diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index c002143315..8b5755550e 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -459,7 +459,7 @@ class SupplierPart(models.Model): # The part will have a field 'supplier_parts' which links to the supplier part options part = models.ForeignKey(Part, on_delete=models.CASCADE, related_name='supplier_parts', - limit_choices_to={'purchasable': True}, + limit_choices_to={'purchaseable': True}, ) supplier = models.ForeignKey(Company, on_delete=models.CASCADE, diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 8bdeaea8bb..92c1d5f2da 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -341,7 +341,7 @@ class SupplierPartCreate(AjaxCreateView): form_class = EditSupplierPartForm ajax_template_name = 'modal_form.html' ajax_form_title = 'Create new Supplier Part' - template_name = 'company/partcreate.html' + #template_name = 'company/partcreate.html' context_object_name = 'part' def get_initial(self):