From 3f92f009e4d361febc3da06b32fc4db368bd9ce7 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 26 Apr 2022 20:00:06 +1000 Subject: [PATCH] Add configurable setting for batch code generation --- InvenTree/common/models.py | 6 ++++++ InvenTree/templates/InvenTree/settings/stock.html | 1 + 2 files changed, 7 insertions(+) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index bb7de56e99..8bd100dcc9 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -932,6 +932,12 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'validator': bool, }, + 'STOCK_BATCH_CODE_TEMPLATE': { + 'name': _('Batch Code Template'), + 'description': _('Template for generating default batch codes for stock items'), + 'default': '', + }, + 'STOCK_ENABLE_EXPIRY': { 'name': _('Stock Expiry'), 'description': _('Enable stock expiry functionality'), diff --git a/InvenTree/templates/InvenTree/settings/stock.html b/InvenTree/templates/InvenTree/settings/stock.html index a3c0940c1f..f0cd403d68 100644 --- a/InvenTree/templates/InvenTree/settings/stock.html +++ b/InvenTree/templates/InvenTree/settings/stock.html @@ -11,6 +11,7 @@ + {% include "InvenTree/settings/setting.html" with key="STOCK_BATCH_CODE_TEMPLATE" icon="fa-layer-group" %} {% include "InvenTree/settings/setting.html" with key="STOCK_ENABLE_EXPIRY" icon="fa-stopwatch" %} {% include "InvenTree/settings/setting.html" with key="STOCK_STALE_DAYS" icon="fa-calendar" %} {% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_SALE" icon="fa-truck" %}