From 5d6e20d89701b4ab35e1743f9483b08a925c7b77 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 21 Sep 2020 08:05:31 +1000 Subject: [PATCH] Build display improvements - Reload AJAX table instead of entire page - Clean up auto-allocate page - Add extra message --- InvenTree/build/templates/build/allocate.html | 4 ++-- InvenTree/build/templates/build/auto_allocate.html | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/InvenTree/build/templates/build/allocate.html b/InvenTree/build/templates/build/allocate.html index 36aebff870..bf43d0ca85 100644 --- a/InvenTree/build/templates/build/allocate.html +++ b/InvenTree/build/templates/build/allocate.html @@ -415,7 +415,7 @@ InvenTree | Allocate Parts launchModalForm( "{% url 'build-auto-allocate' build.id %}", { - reload: true, + success: reloadTable, } ); }); @@ -424,7 +424,7 @@ InvenTree | Allocate Parts launchModalForm( "{% url 'build-unallocate' build.id %}", { - reload: true, + success: reloadTable, } ); }); diff --git a/InvenTree/build/templates/build/auto_allocate.html b/InvenTree/build/templates/build/auto_allocate.html index fc1e42096b..241471e304 100644 --- a/InvenTree/build/templates/build/auto_allocate.html +++ b/InvenTree/build/templates/build/auto_allocate.html @@ -1,5 +1,6 @@ {% extends "modal_form.html" %} {% load i18n %} +{% load inventree_extras %} {% block pre_form_content %} {{ block.super }} @@ -28,7 +29,7 @@ {{ item.stock_item.part.full_name }}
{{ item.stock_item.part.description }} - {{ item.quantity }} + {% decimal item.quantity %} {{ item.stock_item.location }} {% endfor %} @@ -36,7 +37,9 @@ {% else %}
- {% trans "No stock items found that can be allocated to this build" %} + {% trans "No stock items found that can be automatically allocated to this build" %} +
+ {% trans "Stock items will have to be manually allocated" %}
{% endif %}