mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add a custom template for the install item form
This commit is contained in:
parent
3fe0886207
commit
62734c4b72
17
InvenTree/stock/templates/stock/item_install.html
Normal file
17
InvenTree/stock/templates/stock/item_install.html
Normal file
@ -0,0 +1,17 @@
|
||||
{% extends "modal_form.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block pre_form_content %}
|
||||
|
||||
<p>
|
||||
{% trans "Install another StockItem into this item." %}
|
||||
</p>
|
||||
<p>
|
||||
{% trans "Stock items can only be installed if they meet the following criteria" %}:
|
||||
|
||||
<ul>
|
||||
<li>{% trans "The StockItem links to a Part which is in the BOM for this StockItem" %}</li>
|
||||
<li>{% trans "The StockItem is currently in stock" %}</li>
|
||||
</ul>
|
||||
</p>
|
||||
{% endblock %}
|
@ -1,6 +1,8 @@
|
||||
{% extends "modal_form.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block pre_form_content %}
|
||||
Create serialized items from this stock item.<br>
|
||||
Select quantity to serialize, and unique serial numbers.
|
||||
{% trans "Create serialized items from this stock item." %}
|
||||
<br>
|
||||
{% trans "Select quantity to serialize, and unique serial numbers." %}
|
||||
{% endblock %}
|
@ -698,6 +698,7 @@ class StockItemInstall(AjaxUpdateView):
|
||||
model = StockItem
|
||||
form_class = StockForms.InstallStockForm
|
||||
ajax_form_title = _('Install Stock Item')
|
||||
ajax_template_name = "stock/item_install.html"
|
||||
|
||||
part = None
|
||||
|
||||
|
@ -899,9 +899,6 @@ function loadInstalledInTable(table, options) {
|
||||
var pk = subrow.pk;
|
||||
var html = '';
|
||||
|
||||
html += row.sub_part_detail.full_name;
|
||||
html += " | ";
|
||||
|
||||
if (subrow.serial && subrow.quantity == 1) {
|
||||
html += `{% trans "Serial" %}: ${subrow.serial}`;
|
||||
} else {
|
||||
@ -918,6 +915,10 @@ function loadInstalledInTable(table, options) {
|
||||
return stockStatusDisplay(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'batch',
|
||||
title: '{% trans "Batch" %}',
|
||||
},
|
||||
{
|
||||
field: 'actions',
|
||||
title: '',
|
||||
|
Loading…
Reference in New Issue
Block a user