mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add more fields to ManufacturerPart and SupplierPart tables
This commit is contained in:
parent
5235ad1b0c
commit
6b73e7a408
@ -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):
|
||||
|
@ -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,
|
||||
}
|
||||
],
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user