mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
commit
b623f34881
@ -88,9 +88,6 @@ def isInvenTreeDevelopmentVersion():
|
|||||||
"""
|
"""
|
||||||
Return True if current InvenTree version is a "development" version
|
Return True if current InvenTree version is a "development" version
|
||||||
"""
|
"""
|
||||||
|
|
||||||
print("is dev?", inventreeVersion())
|
|
||||||
|
|
||||||
return inventreeVersion().endswith('dev')
|
return inventreeVersion().endswith('dev')
|
||||||
|
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ function loadBomTable(table, options) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
|
|
||||||
var url = `/part/${row.sub_part_detail.pk}/?display=stock`;
|
var url = `/part/${row.sub_part_detail.pk}/?display=part-stock`;
|
||||||
var text = value;
|
var text = value;
|
||||||
|
|
||||||
if (value == null || value <= 0) {
|
if (value == null || value <= 0) {
|
||||||
|
@ -539,7 +539,7 @@ function loadPartVariantTable(table, partId, options={}) {
|
|||||||
field: 'in_stock',
|
field: 'in_stock',
|
||||||
title: '{% trans "Stock" %}',
|
title: '{% trans "Stock" %}',
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
return renderLink(value, `/part/${row.pk}/?display=stock`);
|
return renderLink(value, `/part/${row.pk}/?display=part-stock`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -945,7 +945,7 @@ function loadPartTable(table, url, options={}) {
|
|||||||
title: '{% trans "Stock" %}',
|
title: '{% trans "Stock" %}',
|
||||||
searchable: false,
|
searchable: false,
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
var link = 'stock';
|
var link = '?display=part-stock';
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
// There IS stock available for this part
|
// There IS stock available for this part
|
||||||
@ -958,17 +958,17 @@ function loadPartTable(table, url, options={}) {
|
|||||||
} else if (row.on_order) {
|
} else if (row.on_order) {
|
||||||
// There is no stock available, but stock is on order
|
// There is no stock available, but stock is on order
|
||||||
value = `0<span class='label label-right label-primary'>{% trans "On Order" %}: ${row.on_order}</span>`;
|
value = `0<span class='label label-right label-primary'>{% trans "On Order" %}: ${row.on_order}</span>`;
|
||||||
link = 'orders';
|
link = '?display=purchase-orders';
|
||||||
} else if (row.building) {
|
} else if (row.building) {
|
||||||
// There is no stock available, but stock is being built
|
// There is no stock available, but stock is being built
|
||||||
value = `0<span class='label label-right label-info'>{% trans "Building" %}: ${row.building}</span>`;
|
value = `0<span class='label label-right label-info'>{% trans "Building" %}: ${row.building}</span>`;
|
||||||
link = 'builds';
|
link = '?display=build-orders';
|
||||||
} else {
|
} else {
|
||||||
// There is no stock available
|
// There is no stock available
|
||||||
value = `0<span class='label label-right label-danger'>{% trans "No Stock" %}</span>`;
|
value = `0<span class='label label-right label-danger'>{% trans "No Stock" %}</span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return renderLink(value, `/part/${row.pk}/${link}/`);
|
return renderLink(value, `/part/${row.pk}/${link}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1019,7 +1019,7 @@ function loadStockTable(table, options) {
|
|||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
var link = `/supplier-part/${row.supplier_part}/?display=stock`;
|
var link = `/supplier-part/${row.supplier_part}/?display=part-stock`;
|
||||||
|
|
||||||
var text = '';
|
var text = '';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user