2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 19:15:41 +00:00

Small fixes

- Hide some tabs that aren't functional yet
- Hide fields instead of marking them as disabled
- Default behaviour is to allow all hosts
This commit is contained in:
Oliver Walters
2019-04-29 18:35:16 +10:00
parent 99b386fb95
commit 3b838d29ec
4 changed files with 14 additions and 4 deletions

View File

@ -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,10 @@ 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