2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 21:50:55 +00:00

Add database model for defining custom units (#5268)

* Add database model for defining custom units

- Database model
- DRF serializer
- API endpoints

* Add validation hook

* Custom check for the 'definition' field

* Add settings page for custom units

- Table of units
- Create / edit / delete buttons

* Allow "unit" field to be empty

- Not actually required for custom unit definition

* Load custom unit definitions into global registry

* Docs: add core concepts page(s)

* Add some back links

* Update docs

* Add unit test for custom unit conversion

* More unit testing

* remove print statements

* Add missing table rule
This commit is contained in:
Oliver
2023-07-19 06:24:16 +10:00
committed by GitHub
parent 81e2c2f8fa
commit 6d3978ea28
17 changed files with 458 additions and 25 deletions

View File

@ -188,6 +188,7 @@ class RuleSet(models.Model):
# Models which currently do not require permissions
'common_colortheme',
'common_customunit',
'common_inventreesetting',
'common_inventreeusersetting',
'common_notificationentry',