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