mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
Label dpi config (#3208)
* Updates for label printing settings: - Make LABEL_ENABLE a global setting - Add LABEL_DPI setting (default = 300) - Add new global settings tab * Use the configured DPI when printing labels
This commit is contained in:
@ -1008,6 +1008,23 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
||||
'validator': InvenTree.validators.validate_part_name_format
|
||||
},
|
||||
|
||||
'LABEL_ENABLE': {
|
||||
'name': _('Enable label printing'),
|
||||
'description': _('Enable label printing from the web interface'),
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'LABEL_DPI': {
|
||||
'name': _('Label Image DPI'),
|
||||
'description': _('DPI resolution when generating image files to supply to label printing plugins'),
|
||||
'default': 300,
|
||||
'validator': [
|
||||
int,
|
||||
MinValueValidator(100),
|
||||
]
|
||||
},
|
||||
|
||||
'REPORT_ENABLE': {
|
||||
'name': _('Enable Reports'),
|
||||
'description': _('Enable generation of reports'),
|
||||
@ -1389,12 +1406,6 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
'LABEL_ENABLE': {
|
||||
'name': _('Enable label printing'),
|
||||
'description': _('Enable label printing from the web interface'),
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
"LABEL_INLINE": {
|
||||
'name': _('Inline label display'),
|
||||
|
Reference in New Issue
Block a user