diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 4d7a861a07..9b350c9fe7 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -91,6 +91,15 @@ class PartCreate(AjaxCreateView): return context + def get_form(self): + form = super(AjaxCreateView, self).get_form() + + # Hide the default_supplier field (there are no matching supplier parts yet!) + #form.fields['default_supplier'].widget.attrs['hidden'] = True + del form.fields['default_supplier'] + + return form + # Pre-fill the category field if a valid category is provided def get_initial(self): """ Get initial data for the new Part object: