mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-01 16:10:43 +00:00
Remove code duplication for part data export
This commit is contained in:
1 parent
2bc97764c7
commit
2d17f957f1
2 files changed
+6
-101
No files matched your search
@@ -31,6 +31,8 @@ class PartResource(ModelResource):
|
||||
|
||||
variant_of = Field(attribute='variant_of', widget=widgets.ForeignKeyWidget(Part))
|
||||
|
||||
suppliers = Field(attribute='supplier_count', readonly=True)
|
||||
|
||||
# Extra calculated meta-data (readonly)
|
||||
in_stock = Field(attribute='total_stock', readonly=True, widget=widgets.IntegerWidget())
|
||||
|
||||
|
||||
Reference in new issue
Block a user