2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-01 04:56:45 +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') 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: class Meta:
model = SupplierPart model = SupplierPart
fields = [ fields = [
'description',
'link',
'manufacturer',
'manufacturer_detail',
'manufacturer_part',
'manufacturer_part_detail',
'MPN',
'note',
'pk', 'pk',
'packaging',
'part', 'part',
'part_detail', 'part_detail',
'pretty_name', 'pretty_name',
'SKU',
'supplier', 'supplier',
'supplier_detail', 'supplier_detail',
'SKU',
'manufacturer',
'MPN',
'manufacturer_detail',
'manufacturer_part',
'description',
'link',
] ]
def create(self, validated_data): def create(self, validated_data):

View File

@ -318,6 +318,12 @@ function loadManufacturerPartTable(table, url, options) {
} }
} }
}, },
{
field: 'description',
title: '{% trans "Description" %}',
sortable: false,
switchable: true,
}
], ],
}); });
} }
@ -550,6 +556,21 @@ function loadSupplierPartTable(table, url, options) {
} }
} }
}, },
{
field: 'description',
title: '{% trans "Description" %}',
sortable: false,
},
{
field: 'note',
title: '{% trans "Notes" %}',
sortable: false,
},
{
field: 'packaging',
title: '{% trans "Packaging" %}',
sortable: false,
}
], ],
}); });
} }