2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 04:26:44 +00:00

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): def __init__(self, *args, **kwargs):
order_detail = kwargs.pop('order_detail', False) 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) item_detail = kwargs.pop('item_detail', False)
location_detail = kwargs.pop('location_detail', False) location_detail = kwargs.pop('location_detail', False)

View File

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