Skip to content

Fix disabled form item from preventing serialized stock location moves - #926

Closed
bcc wants to merge 2 commits into
inventree:masterfrom
bcc:bug-serialized-move
Closed

bcc wants to merge 2 commits into
inventree:masterfrom
bcc:bug-serialized-move

Conversation

@bcc

@bcc bcc commented Aug 21, 2020

Copy link
Copy Markdown
Contributor

Stock that has serial numbers can't be moved between stock locations as the form in InvenTree/stock/templates/stock/stock_adjust.html marks the quantity control as disabled for a serialized item. The item IDs are supplied using this form component, and setting the disabled flag means those IDs are not supplied, at least by Firefox and Chromium.

To reproduce, move a serialized item between locations, and you'll get a "No items were moved" message. Checking the request details, the item name="stock-id-N" is missing, so no item is found. This works fine for stock that is not serialized.

I've removed the 'disabled' flag entirely - the max value already restricts the value from being increased above 1 and if the count is reduced to 0 then no items are moved as expected.

@bcc

bcc commented Aug 21, 2020

Copy link
Copy Markdown
Contributor Author

Oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant