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 authored and GitHub committed 2023-06-01 20:01:48 +10:00
1 parent 18d9ecd0f4
commit 46a808c064
4 files changed
+56 -7

No files matched your search

+29 -1
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'