2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

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
2023-07-05 11:11:19 +10:00
committed by GitHub
parent cf0d30b11c
commit 3bea809823
6 changed files with 67 additions and 15 deletions

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'),