2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-19 19:26:29 +00:00

Add part detail page for company / supplier

This commit is contained in:
Oliver
2018-04-22 23:07:23 +10:00
parent 4ebd8cd6b1
commit ac3de4ce3d
7 changed files with 57 additions and 8 deletions

@@ -7,6 +7,7 @@ from django.http import HttpResponseRedirect
from django.views.generic import DetailView, ListView
from django.views.generic.edit import UpdateView, DeleteView, CreateView
from company.models import Company
from .models import PartCategory, Part, BomItem
from .models import SupplierPart
@@ -226,7 +227,7 @@ class SupplierPartCreate(CreateView):
part_id = self.request.GET.get('part', None)
if supplier_id:
initials['supplier'] = get_object_or_404(Supplier, pk=supplier_id)
initials['supplier'] = get_object_or_404(Company, pk=supplier_id)
# TODO
# self.fields['supplier'].disabled = True
if part_id: