mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Export 'default_supplier' field
This commit is contained in:
		| @@ -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)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user