mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-19 00:51:34 +00:00
Remove code duplication for part data export
This commit is contained in:
@@ -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