diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 0fd924a77a..053cc12864 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -71,6 +71,13 @@ class InvenTreeSetting(models.Model): 'choices': djmoney.settings.CURRENCY_CHOICES, }, + 'BARCODE_ENABLE': { + 'name': _('Barcode Support'), + 'description': _('Enable barcode scanner support'), + 'default': True, + 'validator': bool, + }, + 'PART_IPN_REGEX': { 'name': _('IPN Regex'), 'description': _('Regular expression pattern for matching Part IPN') diff --git a/InvenTree/templates/InvenTree/settings/global.html b/InvenTree/templates/InvenTree/settings/global.html index 76af68b441..6d2f14bfd9 100644 --- a/InvenTree/templates/InvenTree/settings/global.html +++ b/InvenTree/templates/InvenTree/settings/global.html @@ -21,4 +21,12 @@ </tbody> </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 %} \ No newline at end of file