mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Export 'default_supplier' field
This commit is contained in:
parent
2bc34853e2
commit
c579854e89
@ -1,5 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from import_export.admin import ImportExportModelAdmin, ImportExportActionModelAdmin
|
||||
from import_export.admin import ImportExportModelAdmin
|
||||
from import_export.resources import ModelResource
|
||||
from import_export.fields import Field
|
||||
import import_export.widgets as widgets
|
||||
@ -21,6 +21,8 @@ class PartResource(ModelResource):
|
||||
|
||||
default_location = Field(attribute='default_location', widget=widgets.ForeignKeyWidget(StockLocation))
|
||||
|
||||
default_supplirt = Field(attribute='default_supplier', widget=widgets.ForeignKeyWidget(SupplierPart))
|
||||
|
||||
category_name = Field(attribute='category__name', readonly=True)
|
||||
|
||||
variant_of = Field(attribute='variant_of', widget=widgets.ForeignKeyWidget(Part))
|
||||
|
Loading…
Reference in New Issue
Block a user