diff --git a/InvenTree/templates/js/translated/model_renderers.js b/InvenTree/templates/js/translated/model_renderers.js index 3136ebee29..0c3dabc27e 100644 --- a/InvenTree/templates/js/translated/model_renderers.js +++ b/InvenTree/templates/js/translated/model_renderers.js @@ -112,7 +112,13 @@ function renderStockLocation(name, data, parameters, options) { var html = `${level}${data.pathstring}`; - if (data.description) { + var render_description = true; + + if ('render_description' in parameters) { + render_description = parameters['render_description']; + } + + if (render_description && data.description) { html += ` - ${data.description}`; } diff --git a/InvenTree/templates/js/translated/order.js b/InvenTree/templates/js/translated/order.js index 613499344c..ff41ca610a 100644 --- a/InvenTree/templates/js/translated/order.js +++ b/InvenTree/templates/js/translated/order.js @@ -249,6 +249,14 @@ function newPurchaseOrderFromOrderWizard(e) { */ function receivePurchaseOrderItems(order_id, line_items, options={}) { + if (line_items.length == 0) { + showAlertDialog( + '{% trans "Select Line Items" %}', + '{% trans "At least one line item must be selected" %}', + ); + return; + } + function renderLineItem(line_item, opts={}) { var pk = line_item.pk; @@ -343,9 +351,9 @@ function receivePurchaseOrderItems(order_id, line_items, options={}) {