diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index b471fee3fc..5aee7b0fec 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -538,13 +538,6 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'validator': bool }, - 'PART_RECENT_COUNT': { - 'name': _('Recent Part Count'), - 'description': _('Number of recent parts to display on index page'), - 'default': 10, - 'validator': [int, MinValueValidator(1)] - }, - 'PART_TEMPLATE': { 'name': _('Template'), 'description': _('Parts are templates by default'), @@ -711,13 +704,6 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'validator': bool, }, - 'STOCK_RECENT_COUNT': { - 'name': _('Recent Stock Count'), - 'description': _('Number of recent stock items to display on index page'), - 'default': 10, - 'validator': [int, MinValueValidator(1)] - }, - 'BUILDORDER_REFERENCE_PREFIX': { 'name': _('Build Order Reference Prefix'), 'description': _('Prefix value for build order reference'), @@ -772,6 +758,13 @@ class InvenTreeUserSetting(BaseInvenTreeSetting): 'default': True, 'validator': bool, }, + 'PART_RECENT_COUNT': { + 'name': _('Recent Part Count'), + 'description': _('Number of recent parts to display on index page'), + 'default': 10, + 'validator': [int, MinValueValidator(1)] + }, + 'HOMEPAGE_BOM_VALIDATION': { 'name': _('Show unvalidated BOMs'), 'description': _('Show BOMs that await validation on the homepage'), @@ -784,6 +777,12 @@ class InvenTreeUserSetting(BaseInvenTreeSetting): 'default': True, 'validator': bool, }, + 'STOCK_RECENT_COUNT': { + 'name': _('Recent Stock Count'), + 'description': _('Number of recent stock items to display on index page'), + 'default': 10, + 'validator': [int, MinValueValidator(1)] + }, 'HOMEPAGE_STOCK_LOW': { 'name': _('Show low stock'), 'description': _('Show low stock items on the homepage'), diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index ee08777502..51f8d2ed45 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -116,7 +116,7 @@ addHeaderAction('latest-parts', '{% trans "Latest Parts" %}', 'fa-newspaper'); loadSimplePartTable("#table-latest-parts", "{% url 'api-part-list' %}", { params: { ordering: "-creation_date", - max_results: {% settings_value "PART_RECENT_COUNT" %}, + max_results: {% settings_value "PART_RECENT_COUNT" user=request.user %}, }, name: 'latest_parts', }); @@ -155,7 +155,7 @@ loadStockTable($('#table-recently-updated-stock'), { params: { part_detail: true, ordering: "-updated", - max_results: {% settings_value "STOCK_RECENT_COUNT" %}, + max_results: {% settings_value "STOCK_RECENT_COUNT" user=request.user %}, }, name: 'recently-updated-stock', grouping: false, diff --git a/InvenTree/templates/InvenTree/settings/part.html b/InvenTree/templates/InvenTree/settings/part.html index 7acb116616..3fa20820b1 100644 --- a/InvenTree/templates/InvenTree/settings/part.html +++ b/InvenTree/templates/InvenTree/settings/part.html @@ -20,7 +20,6 @@ {% include "InvenTree/settings/setting.html" with key="PART_SHOW_QUANTITY_IN_FORMS" icon="fa-hashtag" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_PRICE_IN_FORMS" icon="fa-dollar-sign" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_RELATED" icon="fa-random" %} - {% include "InvenTree/settings/setting.html" with key="PART_RECENT_COUNT" icon="fa-clock" %} {% include "InvenTree/settings/setting.html" with key="PART_CREATE_INITIAL" icon="fa-boxes" %}