mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
Simplify exporting of BOM for a part
This commit is contained in:
@ -131,7 +131,13 @@ class BomItemResource(ModelResource):
|
||||
|
||||
part = Field(attribute='part', widget=widgets.ForeignKeyWidget(Part))
|
||||
|
||||
sub_part = Field(attribute='part', widget=widgets.ForeignKeyWidget(Part))
|
||||
part_name = Field(attribute='part__name', readonly=True)
|
||||
|
||||
sub_part = Field(attribute='sub_part', widget=widgets.ForeignKeyWidget(Part))
|
||||
|
||||
sub_part_name = Field(attribute='sub_part__name', readonly=True)
|
||||
|
||||
stock = Field(attribute='sub_part__total_stock', readonly=True)
|
||||
|
||||
class Meta:
|
||||
model = BomItem
|
||||
@ -139,6 +145,8 @@ class BomItemResource(ModelResource):
|
||||
report_skipped = False
|
||||
clean_model_instances = True
|
||||
|
||||
exclude = ('checksum')
|
||||
|
||||
|
||||
class BomItemAdmin(ImportExportModelAdmin):
|
||||
|
||||
|
Reference in New Issue
Block a user