Remove REPORT_ENABLE_TEST_REPORT setting

This commit is contained in:
Oliver Walters 2024-08-28 03:08:01 +00:00
parent 0ee8560eff
commit 6d8620c427
5 changed files with 2 additions and 21 deletions

View File

@ -1704,12 +1704,6 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'default': 'A4',
'choices': report.helpers.report_page_size_options,
},
'REPORT_ENABLE_TEST_REPORT': {
'name': _('Enable Test Reports'),
'description': _('Enable generation of test reports'),
'default': True,
'validator': bool,
},
'SERIAL_NUMBER_GLOBALLY_UNIQUE': {
'name': _('Globally Unique Serials'),
'description': _('Serial numbers for stock items must be globally unique'),

View File

@ -228,9 +228,6 @@ class SettingsTest(InvenTreeTestCase):
report_size_obj = InvenTreeSetting.get_setting_object(
'REPORT_DEFAULT_PAGE_SIZE'
)
report_test_obj = InvenTreeSetting.get_setting_object(
'REPORT_ENABLE_TEST_REPORT'
)
# check settings base fields
self.assertEqual(instance_obj.name, 'Server Instance Name')
@ -260,7 +257,6 @@ class SettingsTest(InvenTreeTestCase):
# check setting_type
self.assertEqual(instance_obj.setting_type(), 'string')
self.assertEqual(report_test_obj.setting_type(), 'boolean')
self.assertEqual(stale_days.setting_type(), 'integer')
# check as_int
@ -269,9 +265,6 @@ class SettingsTest(InvenTreeTestCase):
instance_obj.as_int(), 'InvenTree'
) # not an int -> return default
# check as_bool
self.assertEqual(report_test_obj.as_bool(), True)
# check to_native_value
self.assertEqual(stale_days.to_native_value(), 0)

View File

@ -54,19 +54,15 @@
</div>
{% endif %}
<!-- Document / label menu -->
{% if test_report_enabled or labels_enabled %}
<div class='btn-group' role='group'>
<button id='document-options' title='{% trans "Printing actions" %}' class='btn btn-outline-secondary dropdown-toggle' type='button' data-bs-toggle='dropdown'><span class='fas fa-print'></span> <span class='caret'></span></button>
<ul class='dropdown-menu' role='menu'>
{% if labels_enabled %}
<li><a class='dropdown-item' href='#' id='print-label'><span class='fas fa-tag'></span> {% trans "Print Label" %}</a></li>
{% endif %}
{% if test_report_enabled %}
<li><a class='dropdown-item' href='#' id='stock-test-report'><span class='fas fa-file-pdf'></span> {% trans "Test Report" %}</a></li>
{% endif %}
<li><a class='dropdown-item' href='#' id='stock-test-report'><span class='fas fa-file-pdf'></span> {% trans "Print Report" %}</a></li>
</ul>
</div>
{% endif %}
<!-- Stock adjustment menu -->
{% if user_owns_item %}

View File

@ -18,7 +18,6 @@
{% include "InvenTree/settings/setting.html" with key="REPORT_DEFAULT_PAGE_SIZE" icon="fa-print" %}
{% include "InvenTree/settings/setting.html" with key="REPORT_DEBUG_MODE" icon="fa-laptop-code" %}
{% include "InvenTree/settings/setting.html" with key="REPORT_LOG_ERRORS" icon="fa-exclamation-circle" %}
{% include "InvenTree/settings/setting.html" with key="REPORT_ENABLE_TEST_REPORT" icon="fa-vial" %}
</tbody>
</table>

View File

@ -161,8 +161,7 @@ export default function SystemSettings() {
'REPORT_ENABLE',
'REPORT_DEFAULT_PAGE_SIZE',
'REPORT_DEBUG_MODE',
'REPORT_LOG_ERRORS',
'REPORT_ENABLE_TEST_REPORT'
'REPORT_LOG_ERRORS'
]}
/>
)