Add setting to enable / disable barcode support

(Default = True)
This commit is contained in:
Oliver Walters 2021-01-28 20:18:03 +11:00
parent 14d24ebe07
commit 51a33e5dca
2 changed files with 15 additions and 0 deletions

View File

@ -71,6 +71,13 @@ class InvenTreeSetting(models.Model):
'choices': djmoney.settings.CURRENCY_CHOICES, 'choices': djmoney.settings.CURRENCY_CHOICES,
}, },
'BARCODE_ENABLE': {
'name': _('Barcode Support'),
'description': _('Enable barcode scanner support'),
'default': True,
'validator': bool,
},
'PART_IPN_REGEX': { 'PART_IPN_REGEX': {
'name': _('IPN Regex'), 'name': _('IPN Regex'),
'description': _('Regular expression pattern for matching Part IPN') 'description': _('Regular expression pattern for matching Part IPN')

View File

@ -21,4 +21,12 @@
</tbody> </tbody>
</table> </table>
<h4>{% trans "Barcode Settings" %}</h4>
<table class='table table-striped table-condensed'>
{% include "InvenTree/settings/header.html" %}
<tbody>
{% include "InvenTree/settings/setting.html" with key="BARCODE_ENABLE" icon="fa-qrcode" %}
</tbody>
</table>
{% endblock %} {% endblock %}