mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
Fixes and improvements for the part import wizard (#4127)
Made changes that resemble PR #4050 to the part import wizard to make the correct form show. Added option to download a part import template file. Increased the number of allowable formfield because the importer creates a lot of table fields when importing multiple parts at once.
This commit is contained in:
@ -104,6 +104,24 @@ class PartResource(InvenTreeResource):
|
||||
models.Part.objects.rebuild()
|
||||
|
||||
|
||||
class PartImportResource(InvenTreeResource):
|
||||
"""Class for managing Part data import/export."""
|
||||
|
||||
class Meta(PartResource.Meta):
|
||||
"""Metaclass definition"""
|
||||
skip_unchanged = True
|
||||
report_skipped = False
|
||||
clean_model_instances = True
|
||||
exclude = [
|
||||
'id', 'category__name', 'creation_date', 'creation_user',
|
||||
'pricing__overall_min', 'pricing__overall_max',
|
||||
'bom_checksum', 'bom_checked_by', 'bom_checked_date',
|
||||
'lft', 'rght', 'tree_id', 'level',
|
||||
'metadata',
|
||||
'barcode_data', 'barcode_hash',
|
||||
]
|
||||
|
||||
|
||||
class StocktakeInline(admin.TabularInline):
|
||||
"""Inline for part stocktake data"""
|
||||
model = models.PartStocktake
|
||||
|
Reference in New Issue
Block a user