From 7533a9ac0c8efa96a4840963fcc50d3c68e519b0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 20 Aug 2021 22:51:36 +0200 Subject: [PATCH] disable ordering on IPN if fixed ordering --- InvenTree/templates/js/translated/part.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index 4ed631fe61..a5f296bf3f 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -814,11 +814,14 @@ function loadPartTable(table, url, options={}) { }); } - columns.push({ + col = { field: 'IPN', title: 'IPN', - sortable: true, - }), + }; + if (!options.params.ordering) { + col['sortable'] = true; + }; + columns.push(col); columns.push({ field: 'name',