mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 05:25:42 +00:00
Use django_import_export
- Allows import / export to multiple file formats - Provides admin interface - Work to be done to perform data tweaking - It would be really cool if the data fields could be associated 'intelligently' (i.e. not just based on PK, but name-lookup too).
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
from django.contrib import admin
|
||||
from import_export.admin import ImportExportModelAdmin
|
||||
|
||||
from .models import PartCategory, Part
|
||||
from .models import BomItem
|
||||
from .models import PartAttachment
|
||||
|
||||
class PartAdmin(admin.ModelAdmin):
|
||||
#class PartAdmin(admin.ModelAdmin):
|
||||
class PartAdmin(ImportExportModelAdmin):
|
||||
|
||||
list_display = ('name', 'IPN', 'description', 'stock', 'category')
|
||||
|
||||
@ -13,7 +15,8 @@ class PartCategoryAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'pathstring', 'description')
|
||||
|
||||
class BomItemAdmin(admin.ModelAdmin):
|
||||
#class BomItemAdmin(admin.ModelAdmin):
|
||||
class BomItemAdmin(ImportExportModelAdmin):
|
||||
list_display=('part', 'sub_part', 'quantity')
|
||||
|
||||
class PartAttachmentAdmin(admin.ModelAdmin):
|
||||
|
Reference in New Issue
Block a user