2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 20:51:00 +00:00

Add more fields to ManufacturerPart and SupplierPart tables

This commit is contained in:
Oliver
2021-07-09 14:28:32 +10:00
parent 5235ad1b0c
commit 6b73e7a408
2 changed files with 32 additions and 8 deletions

View File

@ -206,24 +206,27 @@ class SupplierPartSerializer(InvenTreeModelSerializer):
MPN = serializers.StringRelatedField(source='manufacturer_part.MPN')
manufacturer_part = ManufacturerPartSerializer(read_only=True)
manufacturer_part_detail = ManufacturerPartSerializer(source='manufacturer_part', read_only=True)
class Meta:
model = SupplierPart
fields = [
'description',
'link',
'manufacturer',
'manufacturer_detail',
'manufacturer_part',
'manufacturer_part_detail',
'MPN',
'note',
'pk',
'packaging',
'part',
'part_detail',
'pretty_name',
'SKU',
'supplier',
'supplier_detail',
'SKU',
'manufacturer',
'MPN',
'manufacturer_detail',
'manufacturer_part',
'description',
'link',
]
def create(self, validated_data):