2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 11:40:58 +00:00

Add user settings to remember the last/favourite label template (#4938)

* Add user settings to remember the last/favourite label template

Fixes #4932

* Remove settings_value from translated templates

Thanks Oliver for the hint!
This commit is contained in:
Miklós Márton
2023-06-01 12:01:48 +02:00
committed by GitHub
parent 18d9ecd0f4
commit 46a808c064
4 changed files with 56 additions and 7 deletions

View File

@ -2100,7 +2100,35 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
MinValueValidator(0),
],
'default': 100,
}
},
'DEFAULT_PART_LABEL_TEMPLATE': {
'name': _('Default part label template'),
'description': _('The part label template to be automatically selected'),
'validator': [
int,
],
'default': '',
},
'DEFAULT_ITEM_LABEL_TEMPLATE': {
'name': _('Default stock item template'),
'description': _('The stock item label template to be automatically selected'),
'validator': [
int,
],
'default': '',
},
'DEFAULT_LOCATION_LABEL_TEMPLATE': {
'name': _('Default stock location label template'),
'description': _('The stock location label template to be automatically selected'),
'validator': [
int,
],
'default': '',
},
}
typ = 'user'