Closed mcollins-sol closed 9 months ago
@mcollins-sol your suggested solution seems reasonable - can you submit a PR to address this?
@SchrodingersGat I would love to help - I'm in awe of what you've accomplished. However, I've never created a PR on any project. I don't want to do it wrong and cause you more work than actual help.
@mcollins-DL no worries, it can be a bit daunting! I suggest that you give it a go, we would certainly welcome the contribution and it is not too hard once you've done one.
There are some good tutorials online for creating a PR with github:
Also, check out our contribution guide
Closed in #6117
Please verify that this bug has NOT been raised before.
Describe the bug*
After a serialized stock item is received against a Return Order line, it can't be allocated to another SO even after it has been inspected/repaired and Status=OK. The allocation against the original SO isn't cleared when the Return Order line is received. Adding _stockitem.clearAllocations() under the Update Stock Items section of function _InvenTree/order/models.py ReturnOrder.receive_lineitem solves this issue. I made this change at current line# 1929 and verified in our test environment.
Curiously, although StockItem.clearAllocations function is defined, it doesn't appear to be called anywhere yet.
Steps to Reproduce
Expected behaviour
Receipt of a Return Order Line should clear SO Allocations. It is in a Stock Location with Status=Quarantined and should not be allocated to the SO. Once the returned Stock Item Status Code is changed to one that's in the Available list, it should be Available for allocation on other SO Lines.
Deployment Method
Version Information
0.12.8
Please verify if you can reproduce this bug on the demo site.
Relevant log output
No response