mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Remove references to old setting
- Now offloaded to plugins
This commit is contained in:
parent
d5e8227782
commit
0ee8560eff
@ -1710,14 +1710,6 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
'REPORT_ATTACH_TEST_REPORT': {
|
||||
'name': _('Attach Test Reports'),
|
||||
'description': _(
|
||||
'When printing a Test Report, attach a copy of the Test Report to the associated Stock Item'
|
||||
),
|
||||
'default': False,
|
||||
'validator': bool,
|
||||
},
|
||||
'SERIAL_NUMBER_GLOBALLY_UNIQUE': {
|
||||
'name': _('Globally Unique Serials'),
|
||||
'description': _('Serial numbers for stock items must be globally unique'),
|
||||
|
@ -580,24 +580,6 @@ class TestReportTest(PrintTestMixins, ReportTest):
|
||||
Attachment.objects.filter(model_id=item.pk, model_type='stockitem').exists()
|
||||
)
|
||||
|
||||
return
|
||||
# TODO @matmair - Re-add this test after https://github.com/inventree/InvenTree/pull/7074/files#r1600694356 is resolved
|
||||
# Change the setting, now the test report should be attached automatically
|
||||
InvenTreeSetting.set_setting('REPORT_ATTACH_TEST_REPORT', True, None)
|
||||
|
||||
response = self.post(
|
||||
url, {'template': template.pk, 'items': [item.pk]}, expected_code=201
|
||||
)
|
||||
|
||||
# There should be a link to the generated PDF
|
||||
self.assertEqual(response.data['output'].startswith('/media/report/'), True)
|
||||
|
||||
# Check that a report has been uploaded
|
||||
attachment = Attachment.objects.filter(
|
||||
model_id=item.pk, model_type='stockitem'
|
||||
).first()
|
||||
self.assertIsNotNone(attachment)
|
||||
|
||||
def test_mdl_build(self):
|
||||
"""Test the Build model."""
|
||||
self.run_print_test(Build, 'build', label=False)
|
||||
|
@ -19,7 +19,6 @@
|
||||
{% 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" %}
|
||||
{% include "InvenTree/settings/setting.html" with key="REPORT_ATTACH_TEST_REPORT" icon="fa-file-upload" %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -162,8 +162,7 @@ export default function SystemSettings() {
|
||||
'REPORT_DEFAULT_PAGE_SIZE',
|
||||
'REPORT_DEBUG_MODE',
|
||||
'REPORT_LOG_ERRORS',
|
||||
'REPORT_ENABLE_TEST_REPORT',
|
||||
'REPORT_ATTACH_TEST_REPORT'
|
||||
'REPORT_ENABLE_TEST_REPORT'
|
||||
]}
|
||||
/>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user