mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Merge remote-tracking branch 'inventree/master' into build-allocation
# Conflicts: # InvenTree/company/templates/company/tabs.html
This commit is contained in:
@ -7,6 +7,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.views.generic import DetailView, ListView
|
||||
from django.forms.models import model_to_dict
|
||||
from django.forms import HiddenInput
|
||||
|
||||
from InvenTree.views import AjaxUpdateView, AjaxDeleteView, AjaxCreateView
|
||||
|
||||
@ -141,6 +142,9 @@ class StockItemCreate(AjaxCreateView):
|
||||
parts = parts.filter(part=part)
|
||||
form.fields['supplier_part'].queryset = parts
|
||||
|
||||
# Hide the 'part' field
|
||||
form.fields['part'].widget = HiddenInput()
|
||||
|
||||
# Otherwise if the user has selected a SupplierPart, we know what Part they meant!
|
||||
elif form['supplier_part'].value() is not None:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user