disable ordering on stock

This commit is contained in:
Matthias 2021-08-20 22:53:25 +02:00
parent 5a59a37a89
commit 8fad704d76
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -890,11 +890,10 @@ function loadPartTable(table, url, options={}) {
}; };
columns.push(col); columns.push(col);
columns.push({ col = {
field: 'in_stock', field: 'in_stock',
title: '{% trans "Stock" %}', title: '{% trans "Stock" %}',
searchable: false, searchable: false,
sortable: true,
formatter: function(value, row, index, field) { formatter: function(value, row, index, field) {
var link = "stock"; var link = "stock";
@ -921,7 +920,11 @@ function loadPartTable(table, url, options={}) {
return renderLink(value, '/part/' + row.pk + "/" + link + "/"); return renderLink(value, '/part/' + row.pk + "/" + link + "/");
} }
}); };
if (!options.params.ordering) {
col['sortable'] = true;
};
columns.push(col);
columns.push({ columns.push({
field: 'link', field: 'link',