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" %}
|
{% extends "modal_form.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block pre_form_content %}
|
{% block pre_form_content %}
|
||||||
Create serialized items from this stock item.<br>
|
{% trans "Create serialized items from this stock item." %}
|
||||||
Select quantity to serialize, and unique serial numbers.
|
<br>
|
||||||
|
{% trans "Select quantity to serialize, and unique serial numbers." %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -698,6 +698,7 @@ class StockItemInstall(AjaxUpdateView):
|
|||||||
model = StockItem
|
model = StockItem
|
||||||
form_class = StockForms.InstallStockForm
|
form_class = StockForms.InstallStockForm
|
||||||
ajax_form_title = _('Install Stock Item')
|
ajax_form_title = _('Install Stock Item')
|
||||||
|
ajax_template_name = "stock/item_install.html"
|
||||||
|
|
||||||
part = None
|
part = None
|
||||||
|
|
||||||
|
@ -899,9 +899,6 @@ function loadInstalledInTable(table, options) {
|
|||||||
var pk = subrow.pk;
|
var pk = subrow.pk;
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += row.sub_part_detail.full_name;
|
|
||||||
html += " | ";
|
|
||||||
|
|
||||||
if (subrow.serial && subrow.quantity == 1) {
|
if (subrow.serial && subrow.quantity == 1) {
|
||||||
html += `{% trans "Serial" %}: ${subrow.serial}`;
|
html += `{% trans "Serial" %}: ${subrow.serial}`;
|
||||||
} else {
|
} else {
|
||||||
@ -918,6 +915,10 @@ function loadInstalledInTable(table, options) {
|
|||||||
return stockStatusDisplay(value);
|
return stockStatusDisplay(value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'batch',
|
||||||
|
title: '{% trans "Batch" %}',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'actions',
|
field: 'actions',
|
||||||
title: '',
|
title: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user