mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
- 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).
19 lines
541 B
Python
19 lines
541 B
Python
from django.contrib import admin
|
|
from import_export.admin import ImportExportModelAdmin
|
|
|
|
from .models import Supplier, SupplierPart, Customer, Manufacturer
|
|
|
|
|
|
class CompanyAdmin(ImportExportModelAdmin):
|
|
list_display = ('name', 'website', 'contact')
|
|
|
|
|
|
class SupplierPartAdmin(ImportExportModelAdmin):
|
|
list_display = ('part', 'supplier', 'SKU')
|
|
|
|
|
|
admin.site.register(Customer, CompanyAdmin)
|
|
admin.site.register(Supplier, CompanyAdmin)
|
|
admin.site.register(Manufacturer, CompanyAdmin)
|
|
admin.site.register(SupplierPart, SupplierPartAdmin)
|