Add some helper magic for setting objects

- If the setting is defined as a "bool" then the returned value is automatically cast to a bool
- Add some more unit testing
This commit is contained in:
Oliver Walters committed 2020-11-09 23:44:54 +11:00
1 parent 75ab7b247b
commit c95f124578
5 files changed
+112 -7

No files matched your search

@@ -16,10 +16,12 @@
<table class='table table-striped table-condensed'>
<thead></thead>
<tbody>
{% include "InvenTree/settings/setting.html" with key="PART_IPN_REGEX" %}
{% include "InvenTree/settings/setting.html" with key="PART_COMPONENT" %}
{% include "InvenTree/settings/setting.html" with key="PART_PURCHASEABLE" %}
{% include "InvenTree/settings/setting.html" with key="PART_SALABLE" %}
{% include "InvenTree/settings/setting.html" with key="PART_TRACKABLE" %}
{% include "InvenTree/settings/setting.html" with key="PART_IPN_REGEX" %}
<tr><td colspan='4'></td></tr>
{% include "InvenTree/settings/setting.html" with key="PART_COPY_BOM" %}
{% include "InvenTree/settings/setting.html" with key="PART_COPY_PARAMETERS" %}
{% include "InvenTree/settings/setting.html" with key="PART_COPY_TESTS" %}