shipment table tweaks

This commit is contained in:
Oliver 2021-11-26 23:02:29 +11:00
parent d5e7489623
commit c943b320e6
2 changed files with 11 additions and 4 deletions

View File

@ -489,7 +489,7 @@ class SalesOrderAllocationSerializer(InvenTreeModelSerializer):
def __init__(self, *args, **kwargs):
order_detail = kwargs.pop('order_detail', False)
part_detail = kwargs.pop('part_detail', False)
part_detail = kwargs.pop('part_detail', True)
item_detail = kwargs.pop('item_detail', False)
location_detail = kwargs.pop('location_detail', False)

View File

@ -1206,7 +1206,11 @@ function loadSalesOrderShipmentTable(table, options={}) {
detailFormatter: function(index, row, element) {
return showAllocationSubTable(index, row, element, options);
},
onPostBody: setupShipmentCallbacks,
onPostBody: function() {
setupShipmentCallbacks();
$(table).bootstrapTable('expandAllRows');
},
formatNoMatches: function() {
return '{% trans "No matching shipments found" %}';
},
@ -1218,7 +1222,7 @@ function loadSalesOrderShipmentTable(table, options={}) {
},
{
field: 'reference',
title: '{% trans "Reference" %}',
title: '{% trans "Shipment" %}',
switchable: false,
},
{
@ -1734,8 +1738,11 @@ function showAllocationSubTable(index, row, element, options) {
showHeader: false,
columns: [
{
field: 'part',
field: 'part_detail',
title: '{% trans "Part" %}',
formatter: function(part, row) {
return imageHoverIcon(part.thumbnail) + renderLink(part.full_name, `/part/${part.pk}/`);
}
},
{
field: 'allocated',