renaming a few parts

This commit is contained in:
Matthias 2021-05-22 15:39:54 +02:00
parent 900f707ff9
commit 3c5bb048a1
2 changed files with 6 additions and 6 deletions

View File

@ -577,7 +577,7 @@ class PurchaseOrderUpload(FileManagementFormView):
''' PurchaseOrder: Upload file, match to fields and parts (using multi-Step form) '''
# overriden classes
class MyMatch(cm_forms.MatchItem):
class OrderMatchItem(cm_forms.MatchItem):
""" override MatchItem fields """
def get_special_field(self, col_guess, row, file_manager):
""" set special field """
@ -608,7 +608,7 @@ class PurchaseOrderUpload(FileManagementFormView):
default_amount=self.clean_nbr(row.get('price', '')),
)
class MyFileManager(FileManager):
class OrderFileManager(FileManager):
REQUIRED_HEADERS = [
'Quantity',
]
@ -626,7 +626,7 @@ class PurchaseOrderUpload(FileManagementFormView):
name = 'order'
form_list_override = [
('items', MyMatch),
('items', OrderMatchItem),
]
form_steps_template = [
'order/order_wizard/po_upload.html',
@ -645,7 +645,7 @@ class PurchaseOrderUpload(FileManagementFormView):
'reference': 'reference',
'notes': 'notes',
}
file_manager_class = MyFileManager
file_manager_class = OrderFileManager
def get_order(self):
""" Get order or return 404 """

View File

@ -727,7 +727,7 @@ class PartImport(FileManagementFormView):
''' Part: Upload file, match to fields and import parts(using multi-Step form) '''
permission_required = 'part.add'
class MyFileManager(FileManager):
class PartFileManager(FileManager):
REQUIRED_HEADERS = [
'Name',
'Description',
@ -777,7 +777,7 @@ class PartImport(FileManagementFormView):
'default_location': 'default_location',
'default_supplier': 'default_supplier',
}
file_manager_class = MyFileManager
file_manager_class = PartFileManager
def get_field_selection(self):
""" Fill the form fields for step 3 """