2
0
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:
Oliver
2026-05-19 17:06:05 +10:00
committed by GitHub
parent cd5bd3c245
commit 9cac925e91
7 changed files with 127 additions and 76 deletions
+1
View File
@@ -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',