mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-01 16:10:43 +00:00
Simplify exporting of BOM for a part
This commit is contained in:
1 parent
ed20e9d4a1
commit
db04f399c1
5 files changed
+36
-96
No files matched your search
@@ -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