From da9d2f7467fd81d9aa3c64e05e3316aa482b84c1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 23 Oct 2021 22:49:06 +0200 Subject: [PATCH] Added missing fields Fixes #2181 --- InvenTree/part/views.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 5a4167ea05..330e7ae49c 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -245,6 +245,7 @@ class PartImport(FileManagementFormView): 'Category', 'default_location', 'default_supplier', + 'variant_of', ] OPTIONAL_HEADERS = [ @@ -256,6 +257,16 @@ class PartImport(FileManagementFormView): 'minimum_stock', 'Units', 'Notes', + 'Active', + 'base_cost', + 'Multiple', + 'assembly', + 'component', + 'is_template', + 'purchaseable', + 'salable', + 'trackable', + 'virtual', ] name = 'part' @@ -284,6 +295,17 @@ class PartImport(FileManagementFormView): 'category': 'category', 'default_location': 'default_location', 'default_supplier': 'default_supplier', + 'variant_of': 'variant_of', + 'active': 'active', + 'base_cost': 'base_cost', + 'multiple': 'multiple', + 'assembly': 'assembly', + 'component': 'component', + 'is_template': 'is_template', + 'purchaseable': 'purchaseable', + 'salable': 'salable', + 'trackable': 'trackable', + 'virtual': 'virtual', } file_manager_class = PartFileManager @@ -299,6 +321,8 @@ class PartImport(FileManagementFormView): self.matches['default_location'] = ['name__contains'] self.allowed_items['default_supplier'] = SupplierPart.objects.all() self.matches['default_supplier'] = ['SKU__contains'] + self.allowed_items['variant_of'] = Part.objects.all() + self.matches['variant_of'] = ['name__contains'] # setup self.file_manager.setup()