mirror of
https://github.com/inventree/InvenTree.git
synced 2026-06-12 03:28:37 +00:00
Prevent edit serial (#11964)
* Add new global setting * Run serial number validation check * Disable field in frontend * Add unit test * Docs tweak
This commit is contained in:
@@ -232,6 +232,7 @@ export function useStockFields({
|
||||
serial: {
|
||||
placeholderAutofill: true,
|
||||
placeholder: serialGenerator.result,
|
||||
disabled: !create && !globalSettings.isSet('STOCK_ALLOW_EDIT_SERIAL'),
|
||||
hidden:
|
||||
create ||
|
||||
partInstance.trackable == false ||
|
||||
|
||||
@@ -251,6 +251,7 @@ export default function SystemSettings() {
|
||||
<GlobalSettingList
|
||||
keys={[
|
||||
'SERIAL_NUMBER_GLOBALLY_UNIQUE',
|
||||
'STOCK_ALLOW_EDIT_SERIAL',
|
||||
'STOCK_ALLOW_DELETE_SERIALIZED',
|
||||
'STOCK_DELETE_DEPLETED_DEFAULT',
|
||||
'STOCK_BATCH_CODE_TEMPLATE',
|
||||
|
||||
Reference in New Issue
Block a user