diff --git a/InvenTree/part/urls.py b/InvenTree/part/urls.py index c734b7f610..e2b172780a 100644 --- a/InvenTree/part/urls.py +++ b/InvenTree/part/urls.py @@ -120,6 +120,9 @@ part_urls = [ # Create a new part url(r'^new/?', views.PartCreate.as_view(), name='part-create'), + # Upload a part + url(r'^import/', views.PartImport.as_view(), name='part-upload'), + # Create a new BOM item url(r'^bom/new/?', views.BomItemCreate.as_view(), name='bom-item-create'), diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 2fabdb9fc8..d9b0b51693 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -39,6 +39,7 @@ from .models import PartSellPriceBreak from common.models import InvenTreeSetting from company.models import SupplierPart +from common.views import FileManagementFormView import common.settings as inventree_settings @@ -718,6 +719,9 @@ class PartCreate(AjaxCreateView): return initials +class PartImport(FileManagementFormView): + ''' Part: Upload file, match to fields and import parts(using multi-Step form) ''' + class PartNotes(UpdateView): """ View for editing the 'notes' field of a Part object. Presents a live markdown editor.