mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
Small tweaks for BOM export
- Steps towards preventing circular BOMs - Improve formatting of exported BOM
This commit is contained in:
@ -131,11 +131,13 @@ class BomItemResource(ModelResource):
|
||||
|
||||
level = Field(attribute='level', readonly=True)
|
||||
|
||||
part = Field(attribute='part', widget=widgets.ForeignKeyWidget(Part))
|
||||
bom_id = Field(attribute='pk')
|
||||
|
||||
parent_part_id = Field(attribute='part', widget=widgets.ForeignKeyWidget(Part))
|
||||
|
||||
parent_part_name = Field(attribute='part__full_name', readonly=True)
|
||||
|
||||
id = Field(attribute='sub_part', widget=widgets.ForeignKeyWidget(Part))
|
||||
sub_part_id = Field(attribute='sub_part', widget=widgets.ForeignKeyWidget(Part))
|
||||
|
||||
sub_part_name = Field(attribute='sub_part__full_name', readonly=True)
|
||||
|
||||
@ -147,7 +149,12 @@ class BomItemResource(ModelResource):
|
||||
report_skipped = False
|
||||
clean_model_instances = True
|
||||
|
||||
exclude = ['checksum', ]
|
||||
exclude = [
|
||||
'checksum',
|
||||
'id',
|
||||
'part',
|
||||
'sub_part',
|
||||
]
|
||||
|
||||
|
||||
class BomItemAdmin(ImportExportModelAdmin):
|
||||
|
Reference in New Issue
Block a user