mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Merge branch 'master' of https://github.com/inventree/InvenTree into price-history
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_BASE_URL" icon="fa-globe" %}
|
||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_COMPANY_NAME" icon="fa-building" %}
|
||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_DEFAULT_CURRENCY" icon="fa-dollar-sign" %}
|
||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_FIXER_API_KEY" icon="fa-key" %}
|
||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_DOWNLOAD_FROM_URL" icon="fa-cloud-download-alt" %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -29,6 +29,11 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-code'></span></td>
|
||||
<td>{% trans "API Version" %}</td>
|
||||
<td>{% inventree_api_version %}{% include "clip.html" %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-hashtag'></span></td>
|
||||
<td>{% trans "Django Version" %}</td>
|
||||
|
@ -89,6 +89,15 @@ function setFieldOptions(fieldName, optionList, options={}) {
|
||||
}
|
||||
|
||||
|
||||
function clearFieldOptions(fieldName) {
|
||||
/**
|
||||
* Clear (emtpy) the options list for a particular field
|
||||
*/
|
||||
|
||||
setFieldOptions(fieldName, []);
|
||||
}
|
||||
|
||||
|
||||
function reloadFieldOptions(fieldName, options) {
|
||||
/* Reload the options for a given field,
|
||||
* using an AJAX request.
|
||||
|
@ -1017,6 +1017,11 @@ function loadStockTrackingTable(table, options) {
|
||||
formatter: function(details, row, index, field) {
|
||||
var html = `<table class='table table-condensed' id='tracking-table-${row.pk}'>`;
|
||||
|
||||
if (!details) {
|
||||
html += '</table>';
|
||||
return html;
|
||||
}
|
||||
|
||||
// Location information
|
||||
if (details.location) {
|
||||
|
||||
@ -1218,6 +1223,17 @@ function createNewStockItem(options) {
|
||||
field: 'part',
|
||||
action: function(value) {
|
||||
|
||||
if (!value) {
|
||||
// No part chosen
|
||||
|
||||
clearFieldOptions('supplier_part');
|
||||
enableField('serial_numbers', false);
|
||||
enableField('purchase_price_0', false);
|
||||
enableField('purchase_price_1', false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Reload options for supplier part
|
||||
reloadFieldOptions(
|
||||
'supplier_part',
|
||||
@ -1243,6 +1259,9 @@ function createNewStockItem(options) {
|
||||
enableField('serial_numbers', response.trackable);
|
||||
clearField('serial_numbers');
|
||||
|
||||
enableField('purchase_price_0', response.purchaseable);
|
||||
enableField('purchase_price_1', response.purchaseable);
|
||||
|
||||
// Populate the expiry date
|
||||
if (response.default_expiry <= 0) {
|
||||
// No expiry date
|
||||
|
@ -13,6 +13,27 @@
|
||||
<td>{% trans "Instance Name" %}</td>
|
||||
<td>{% inventree_instance_name %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-database'></span></td>
|
||||
<td>{% trans "Database" %}</td>
|
||||
<td>{% inventree_db_engine %}</td>
|
||||
</tr>
|
||||
{% inventree_in_debug_mode as debug_mode %}
|
||||
{% if debug_mode %}
|
||||
<tr>
|
||||
<td><span class='fas fa-laptop-code'></span></td>
|
||||
<td>{% trans "Debug Mode" %}</td>
|
||||
<td>{% trans "Server is running in debug mode" %}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% inventree_docker_mode as docker_mode %}
|
||||
{% if docker_mode %}
|
||||
<tr>
|
||||
<td><span class='fab fa-docker'></span></td>
|
||||
<td>{% trans "Docker Mode" %}</td>
|
||||
<td>{% trans "Server is deployed using docker" %}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<tr>
|
||||
<td><span class='fas fa-server'></span></td>
|
||||
|
@ -27,6 +27,8 @@
|
||||
<!-- Data next to image goes here -->
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block below_thumbnail %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
{% block page_details %}
|
||||
|
@ -2,4 +2,7 @@
|
||||
InvenTree-Version: {% inventree_version %}
|
||||
Django Version: {% django_version %}
|
||||
{% inventree_commit_hash as hash %}{% if hash %}Commit Hash: {{ hash }}{% endif %}
|
||||
{% inventree_commit_date as commit_date %}{% if commit_date %}Commit Date: {{ commit_date }}{% endif %}
|
||||
{% inventree_commit_date as commit_date %}{% if commit_date %}Commit Date: {{ commit_date }}{% endif %}
|
||||
Database: {% inventree_db_engine %}
|
||||
Debug-Mode: {% inventree_in_debug_mode %}
|
||||
Deployed using Docker: {% inventree_docker_mode %}
|
Reference in New Issue
Block a user