diff --git a/InvenTree/templates/js/translated/model_renderers.js b/InvenTree/templates/js/translated/model_renderers.js index e45c4298a9..bdc2528af9 100644 --- a/InvenTree/templates/js/translated/model_renderers.js +++ b/InvenTree/templates/js/translated/model_renderers.js @@ -34,8 +34,8 @@ // Should the ID be rendered for this string function renderId(title, pk, parameters={}) { - // Default = true - var render = true; + // Default = do not render + var render = false; if ('render_pk' in parameters) { render = parameters['render_pk']; @@ -138,7 +138,7 @@ function renderStockLocation(name, data, parameters={}, options={}) { html += ` - ${data.description}`; } - html += `{% trans "Location ID" %}: ${data.pk}`; + html += renderId('{% trans "Location ID" %}', data.pk, parameters); return html; } @@ -155,7 +155,8 @@ function renderBuild(name, data, parameters={}, options={}) { var html = select2Thumbnail(image); html += `${data.reference} - ${data.quantity} x ${data.part_detail.full_name}`; - html += `{% trans "Build ID" %}: ${data.pk}`; + + html += renderId('{% trans "Build ID" %}', data.pk, parameters); html += `
${data.title}
`; @@ -293,12 +294,13 @@ function renderSalesOrderShipment(name, data, parameters={}, options={}) { var so_prefix = global_settings.SALESORDER_REFERENCE_PREFIX; var html = ` - ${so_prefix}${data.order_detail.reference} - {% trans "Shipment" %} ${data.reference} - - {% trans "Shipment ID" %}: ${data.pk} + + ${so_prefix}${data.order_detail.reference} - {% trans "Shipment" %} ${data.reference} `; + html += renderId('{% trans "Shipment ID" %}', data.pk, parameters); + return html; } @@ -315,7 +317,7 @@ function renderPartCategory(name, data, parameters={}, options={}) { html += ` - ${data.description}`; } - html += `{% trans "Category ID" %}: ${data.pk}`; + html += renderId('{% trans "Category ID" %}', data.pk, parameters); return html; } @@ -358,7 +360,7 @@ function renderManufacturerPart(name, data, parameters={}, options={}) { html += ` ${data.manufacturer_detail.name} - ${data.MPN}`; html += ` - ${data.part_detail.full_name}`; - html += `{% trans "Manufacturer Part ID" %}: ${data.pk}`; + html += renderId('{% trans "Manufacturer Part ID" %}', data.pk, parameters); return html; } @@ -393,8 +395,7 @@ function renderSupplierPart(name, data, parameters={}, options={}) { html += ` - ${data.part_detail.full_name}`; } - html += `{% trans "Supplier Part ID" %}: ${data.pk}`; - + html += renderId('{% trans "Supplier Part ID" %}', data.pk, parameters); return html;