mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix server-side ordering for purchase order table
This commit is contained in:
parent
a53aadd466
commit
0b15b77140
@ -140,6 +140,10 @@ class POList(generics.ListCreateAPIView):
|
||||
ordering_fields = [
|
||||
'creation_date',
|
||||
'reference',
|
||||
'supplier__name',
|
||||
'target_date',
|
||||
'line_items',
|
||||
'status',
|
||||
]
|
||||
|
||||
ordering = '-creation_date'
|
||||
|
@ -167,6 +167,7 @@ function loadPurchaseOrderTable(table, options) {
|
||||
field: 'supplier_detail',
|
||||
title: '{% trans "Supplier" %}',
|
||||
sortable: true,
|
||||
sortName: 'supplier__name',
|
||||
formatter: function(value, row, index, field) {
|
||||
return imageHoverIcon(row.supplier_detail.image) + renderLink(row.supplier_detail.name, `/company/${row.supplier}/purchase-orders/`);
|
||||
}
|
||||
@ -174,12 +175,10 @@ function loadPurchaseOrderTable(table, options) {
|
||||
{
|
||||
field: 'supplier_reference',
|
||||
title: '{% trans "Supplier Reference" %}',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'description',
|
||||
title: '{% trans "Description" %}',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
Loading…
Reference in New Issue
Block a user