Unit check option (#5175)

* Add option to control parameter units

* Check setting before validation

* Update part parameter settings page

* Update unit tests

* Update docs
This commit is contained in:
Oliver authored and GitHub committed 2023-07-05 11:11:19 +10:00
1 parent cf0d30b11c
commit 3bea809823
6 files changed
+67 -15

No files matched your search

+7
View File
@@ -1249,6 +1249,13 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'default': '',
},
'PART_PARAMETER_ENFORCE_UNITS': {
'name': _('Enforce Parameter Units'),
'description': _('If units are provided, parameter values must match the specified units'),
'default': True,
'validator': bool,
},
'PRICING_DECIMAL_PLACES_MIN': {
'name': _('Minimum Pricing Decimal Places'),
'description': _('Minimum number of decimal places to display when rendering pricing data'),