Skip to content

Commit

Permalink
Filter fix (#8652)
Browse files Browse the repository at this point in the history
* Allow ordering  by IPN

* Update table
  • Loading branch information
SchrodingersGat authored Dec 11, 2024
1 parent ad6bd63 commit 1adc42d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/backend/InvenTree/order/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ def create(self, request, *args, **kwargs):
ordering_field_aliases = {
'MPN': 'part__manufacturer_part__MPN',
'SKU': 'part__SKU',
'IPN': 'part__part__IPN',
'part_name': 'part__part__name',
'order': 'order__reference',
'status': 'order__status',
Expand All @@ -594,6 +595,7 @@ def create(self, request, *args, **kwargs):
'received',
'reference',
'SKU',
'IPN',
'total_price',
'target_date',
'order',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ export function PurchaseOrderLineItemTable({
accessor: 'part',
title: t`Part`,
sortable: true,
ordering: 'part_name',
switchable: false,
render: (record: any) => PartColumn({ part: record.part_detail })
},
{
accessor: 'part_detail.IPN',
sortable: false
sortable: true,
ordering: 'IPN'
},
{
accessor: 'part_detail.description',
Expand Down

0 comments on commit 1adc42d

Please sign in to comment.