Edit new stock settings on settings page

This commit is contained in:
Oliver Walters 2021-01-05 00:59:10 +11:00
parent 855098e30b
commit 1335c85de1
2 changed files with 13 additions and 3 deletions

View File

@ -156,6 +156,10 @@ class InvenTreeSetting(models.Model):
'PART_VIRTUAL': { 'PART_VIRTUAL': {
'name': _('Virtual'), 'name': _('Virtual'),
'description': _('Parts are virtual by default'), 'description': _('Parts are virtual by default'),
'default': False,
'validator': bool,
},
'STOCK_ALLOW_EXPIRED_SALE': { 'STOCK_ALLOW_EXPIRED_SALE': {
'name': _('Sell Expired Stock'), 'name': _('Sell Expired Stock'),
'description': _('Allow sale of expired stock'), 'description': _('Allow sale of expired stock'),

View File

@ -10,7 +10,13 @@
{% endblock %} {% endblock %}
{% block settings %} {% block settings %}
<div class='alert alert-block alert-info'> <h4>{% trans "Stock Options" %}</h4>
<i>No Stock settings available</i>
</div> <table class='table table-striped table-condensed'>
{% include "InvenTree/settings/header.html" %}
<tbody>
{% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_SALE" %}
{% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_BUILD" %}
</tbody>
</table>
{% endblock %} {% endblock %}