From 4e1862a8602625fd2f7d1c03cae38d971299cb27 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 19 Feb 2026 20:58:11 +1100 Subject: [PATCH] Purchase price ordering (#11379) * Support ordering stock by purchase price * Enhanced error output * Bump API version --- src/backend/InvenTree/InvenTree/api_version.py | 5 ++++- src/backend/InvenTree/stock/api.py | 1 + src/frontend/src/tables/InvenTreeTable.tsx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index 0368310707..7d8846a882 100644 --- a/src/backend/InvenTree/InvenTree/api_version.py +++ b/src/backend/InvenTree/InvenTree/api_version.py @@ -1,11 +1,14 @@ """InvenTree API version information.""" # InvenTree API version -INVENTREE_API_VERSION = 453 +INVENTREE_API_VERSION = 454 """Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" INVENTREE_API_TEXT = """ +v454 -> 2026-02-19 : https://github.com/inventree/InvenTree/pull/11379 + - Adds "purchase_price" ordering option to StockItem API endpoint + v453 -> 2026-02-11 : https://github.com/inventree/InvenTree/pull/11244 - Adds (internal) endpoint to end a observability tooling session diff --git a/src/backend/InvenTree/stock/api.py b/src/backend/InvenTree/stock/api.py index 14bf8b4824..9b2fd32a3b 100644 --- a/src/backend/InvenTree/stock/api.py +++ b/src/backend/InvenTree/stock/api.py @@ -1278,6 +1278,7 @@ class StockList( 'part__name', 'part__IPN', 'updated', + 'purchase_price', 'stocktake_date', 'expiry_date', 'packaging', diff --git a/src/frontend/src/tables/InvenTreeTable.tsx b/src/frontend/src/tables/InvenTreeTable.tsx index a8b0e68135..d84c237721 100644 --- a/src/frontend/src/tables/InvenTreeTable.tsx +++ b/src/frontend/src/tables/InvenTreeTable.tsx @@ -487,7 +487,7 @@ export function InvenTreeTable>({ setSortStatus(status); if (!status.columnAccessor) { - console.error('Invalid column accessor provided for table sorting'); + console.error(`Invalid column accessor provided for table ${cacheKey}`); } setTableSorting(cacheKey)(status);