mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
setup not realy needed
This commit is contained in:
parent
616dd76f8a
commit
dd56bc1fa5
@ -609,24 +609,21 @@ class PurchaseOrderUpload(FileManagementFormView):
|
||||
)
|
||||
|
||||
class MyFileManager(FileManager):
|
||||
def setup(self):
|
||||
self.REQUIRED_HEADERS = [
|
||||
REQUIRED_HEADERS = [
|
||||
'Quantity',
|
||||
]
|
||||
|
||||
self.ITEM_MATCH_HEADERS = [
|
||||
ITEM_MATCH_HEADERS = [
|
||||
'Manufacturer_MPN',
|
||||
'Supplier_SKU',
|
||||
]
|
||||
|
||||
self.OPTIONAL_HEADERS = [
|
||||
OPTIONAL_HEADERS = [
|
||||
'Purchase_Price',
|
||||
'Reference',
|
||||
'Notes',
|
||||
]
|
||||
|
||||
return super().setup()
|
||||
|
||||
name = 'order'
|
||||
form_list_override = [
|
||||
('items', MyMatch),
|
||||
|
@ -754,19 +754,18 @@ class PartImport(FileManagementFormView):
|
||||
'default_supplier': 'default_supplier',
|
||||
}
|
||||
class MyManger(FileManager):
|
||||
def setup(self):
|
||||
self.REQUIRED_HEADERS = [
|
||||
REQUIRED_HEADERS = [
|
||||
'Name',
|
||||
'Description',
|
||||
]
|
||||
|
||||
self.OPTIONAL_MATCH_HEADERS = [
|
||||
OPTIONAL_MATCH_HEADERS = [
|
||||
'Category',
|
||||
'default_location',
|
||||
'default_supplier',
|
||||
]
|
||||
|
||||
self.OPTIONAL_HEADERS = [
|
||||
OPTIONAL_HEADERS = [
|
||||
'Keywords',
|
||||
'IPN',
|
||||
'Revision',
|
||||
@ -776,9 +775,6 @@ class PartImport(FileManagementFormView):
|
||||
'Units',
|
||||
'Notes',
|
||||
]
|
||||
|
||||
return super().setup()
|
||||
|
||||
file_manager_class = MyManger
|
||||
|
||||
def get_field_selection(self):
|
||||
|
Loading…
Reference in New Issue
Block a user