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 = [
|
ordering_fields = [
|
||||||
'creation_date',
|
'creation_date',
|
||||||
'reference',
|
'reference',
|
||||||
|
'supplier__name',
|
||||||
|
'target_date',
|
||||||
|
'line_items',
|
||||||
|
'status',
|
||||||
]
|
]
|
||||||
|
|
||||||
ordering = '-creation_date'
|
ordering = '-creation_date'
|
||||||
|
@ -167,6 +167,7 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
field: 'supplier_detail',
|
field: 'supplier_detail',
|
||||||
title: '{% trans "Supplier" %}',
|
title: '{% trans "Supplier" %}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
sortName: 'supplier__name',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return imageHoverIcon(row.supplier_detail.image) + renderLink(row.supplier_detail.name, `/company/${row.supplier}/purchase-orders/`);
|
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',
|
field: 'supplier_reference',
|
||||||
title: '{% trans "Supplier Reference" %}',
|
title: '{% trans "Supplier Reference" %}',
|
||||||
sortable: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'description',
|
field: 'description',
|
||||||
title: '{% trans "Description" %}',
|
title: '{% trans "Description" %}',
|
||||||
sortable: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
|
Loading…
Reference in New Issue
Block a user