-
Notifications
You must be signed in to change notification settings - Fork 23k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FW][FIX] stock: add automated way to fix unreserve issue #155839
[FW][FIX] stock: add automated way to fix unreserve issue #155839
Conversation
@DavidFesquet this PR targets saas-15.2 and is the last of the forward-port chain. To merge the full chain, use
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
@DavidFesquet ci/runbot failed on this forward-port PR |
13b191a
to
0d350d6
Compare
@DavidFesquet this PR was modified / updated and has become a normal PR. It should be merged the normal way (via @robodoo) |
@fw-bot up to saas-16.3 |
Forward-porting to 'saas-16.3'. |
When there is a discrepancy of reserved quantity between `stock.quant.reserved_quantity` and `stock.move.line.product_qty` the UserError 'It is not possible to unreserve more products of %s than you have in stock' is raised. This discrepancy can be caused by past bug, customization or direct manipulation of `stock.quant` or `stock.move.line` by the users. Once this discrepancy is present, it will not disappear by itself. Currently, there is no functional method to fix these discrepancies, the user encountering this message is stuck until they contact the Odoo support team. Ideally, we would fix every bug related to the reservation so that this UserError almost never appears. However, even after multiple bugs fixed (ex: odoo#144176 , odoo#154327 ) and multiple years of feedback, the users keep encountering this error and keep getting stuck when validating/cancelling transfers. So the idea is to re-introduce a server action like it was done for Odoo 13 & Odoo 14 2 years ago: d99e173 to the current stable version (except the latest one Odoo 17 as we do not have enough perspectives on this version). The server action checks all the quants and their relative move line to check if match correctly. If not, it will remove the reservation from both. It could remove the reservation from some unrelated `pickings` and `stock.move` Forward-Port of odoo#79180 Related to odoo#62139 X-original-commit: 2d6a311 Co-authored-by: Arnold Moyaux <arm@odoo.com>
0d350d6
to
ebfe2b8
Compare
robodoo r+ |
When there is a discrepancy of reserved quantity between `stock.quant.reserved_quantity` and `stock.move.line.product_qty` the UserError 'It is not possible to unreserve more products of %s than you have in stock' is raised. This discrepancy can be caused by past bug, customization or direct manipulation of `stock.quant` or `stock.move.line` by the users. Once this discrepancy is present, it will not disappear by itself. Currently, there is no functional method to fix these discrepancies, the user encountering this message is stuck until they contact the Odoo support team. Ideally, we would fix every bug related to the reservation so that this UserError almost never appears. However, even after multiple bugs fixed (ex: #144176 , #154327 ) and multiple years of feedback, the users keep encountering this error and keep getting stuck when validating/cancelling transfers. So the idea is to re-introduce a server action like it was done for Odoo 13 & Odoo 14 2 years ago: d99e173 to the current stable version (except the latest one Odoo 17 as we do not have enough perspectives on this version). The server action checks all the quants and their relative move line to check if match correctly. If not, it will remove the reservation from both. It could remove the reservation from some unrelated `pickings` and `stock.move` Forward-Port of #79180 Related to #62139 closes #155839 X-original-commit: 2d6a311 Signed-off-by: David Fesquet (dafr) <dafr@odoo.com> Co-authored-by: Arnold Moyaux <arm@odoo.com>
@DavidFesquet child PR #155910 was modified / updated and has become a normal PR. This PR (and any of its parents) will need to be merged independently as approvals won't cross. |
When there is a discrepancy of reserved quantity between
stock.quant.reserved_quantity
andstock.move.line.product_qty
the UserError 'It is not possible to unreserve more products of %s than you have in stock' is raised.This discrepancy can be caused by past bug, customization or direct manipulation of
stock.quant
orstock.move.line
by the users. Once this discrepancy is present, it will not disappear by itself.Currently, there is no functional method to fix these discrepancies, the user encountering this message is stuck until they contact the Odoo support team.
Ideally, we would fix every bug related to the reservation so that this UserError almost never appears. However, even after multiple bugs fixed (ex: #144176 , #154327 ) and multiple years of feedback, the users keep encountering this error and keep getting stuck when validating/cancelling transfers.
So the idea is to re-introduce a server action like it was done for Odoo 13 & Odoo 14 2 years ago: d99e173 to the current stable version (except the latest one Odoo 17 as we do not have enough perspectives on this version).
The server action checks all the quants and their relative move line to check if match correctly. If not, it will remove the reservation from both. It could remove the reservation from some unrelated
pickings
andstock.move
Co-authored-by: Arnold Moyaux arm@odoo.com
Forward-Port of #79180
Related to #62139
Demo:
unreserve-2024-02-21_15.54.42.mp4
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #154905