-
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
[FIX] mrp: reservation rounding for under-consumption backorders #144176
Closed
mwath
wants to merge
1
commit into
odoo:16.0
from
odoo-dev:16.0-mrp-fix-underconsumption-split-unreserve-wama
Closed
[FIX] mrp: reservation rounding for under-consumption backorders #144176
mwath
wants to merge
1
commit into
odoo:16.0
from
odoo-dev:16.0-mrp-fix-underconsumption-split-unreserve-wama
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps to reproduce: 1. Create a BoM with a component of 1 quantity 2. Create a manufacturing order with this BoM 3. Set the quantity to produce to 5 and confirm 4. Set the producing quantity to 3.1 5. Set the quantity done for the raw material to 3.09 6. Mark the MO as done and create a backorder 7. Click 'Unreserve' on the backorder 8. 'It is not possible to unreserve more products of ...' Before this commit: `_compute_quantity` is called with the default rounding method, rounding quantity UP, which introduces reservation inconsistencies. After this commit: `_compute_quantity` rounds with the HALF-UP method, preventing rounding errors. Also, use the correct UoM in float comparisons. opw-3601737
@robodoo r+ |
robodoo
pushed a commit
that referenced
this pull request
Dec 1, 2023
Steps to reproduce: 1. Create a BoM with a component of 1 quantity 2. Create a manufacturing order with this BoM 3. Set the quantity to produce to 5 and confirm 4. Set the producing quantity to 3.1 5. Set the quantity done for the raw material to 3.09 6. Mark the MO as done and create a backorder 7. Click 'Unreserve' on the backorder 8. 'It is not possible to unreserve more products of ...' Before this commit: `_compute_quantity` is called with the default rounding method, rounding quantity UP, which introduces reservation inconsistencies. After this commit: `_compute_quantity` rounds with the HALF-UP method, preventing rounding errors. Also, use the correct UoM in float comparisons. opw-3601737 closes #144176 Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
This was referenced Dec 1, 2023
fw-bot
deleted the
16.0-mrp-fix-underconsumption-split-unreserve-wama
branch
December 15, 2023 11:47
dung2410-art
pushed a commit
to dung2410-art/odoo
that referenced
this pull request
Feb 3, 2024
Steps to reproduce: 1. Create a BoM with a component of 1 quantity 2. Create a manufacturing order with this BoM 3. Set the quantity to produce to 5 and confirm 4. Set the producing quantity to 3.1 5. Set the quantity done for the raw material to 3.09 6. Mark the MO as done and create a backorder 7. Click 'Unreserve' on the backorder 8. 'It is not possible to unreserve more products of ...' Before this commit: `_compute_quantity` is called with the default rounding method, rounding quantity UP, which introduces reservation inconsistencies. After this commit: `_compute_quantity` rounds with the HALF-UP method, preventing rounding errors. Also, use the correct UoM in float comparisons. opw-3601737 closes odoo#144176 Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
luanjubica
pushed a commit
to luanjubica/odoo-code
that referenced
this pull request
Feb 14, 2024
Steps to reproduce: 1. Create a BoM with a component of 1 quantity 2. Create a manufacturing order with this BoM 3. Set the quantity to produce to 5 and confirm 4. Set the producing quantity to 3.1 5. Set the quantity done for the raw material to 3.09 6. Mark the MO as done and create a backorder 7. Click 'Unreserve' on the backorder 8. 'It is not possible to unreserve more products of ...' Before this commit: `_compute_quantity` is called with the default rounding method, rounding quantity UP, which introduces reservation inconsistencies. After this commit: `_compute_quantity` rounds with the HALF-UP method, preventing rounding errors. Also, use the correct UoM in float comparisons. opw-3601737 closes odoo#144176 Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
DavidFesquet
added a commit
to odoo-dev/odoo
that referenced
this pull request
Feb 28, 2024
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` Co-authored-by: Arnold Moyaux <arm@odoo.com> Forward-Port of odoo#79180 Related to odoo#62139
robodoo
pushed a commit
that referenced
this pull request
Feb 29, 2024
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 #154905 Signed-off-by: David Fesquet (dafr) <dafr@odoo.com> Co-authored-by: Arnold Moyaux <arm@odoo.com>
DavidFesquet
added a commit
to odoo-dev/odoo
that referenced
this pull request
Feb 29, 2024
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>
robodoo
pushed a commit
that referenced
this pull request
Feb 29, 2024
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
added a commit
to odoo-dev/odoo
that referenced
this pull request
Mar 1, 2024
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: e16cd27 Co-authored-by: Arnold Moyaux <arm@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Mar 1, 2024
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 #155910 X-original-commit: e16cd27 Signed-off-by: David Fesquet (dafr) <dafr@odoo.com> Co-authored-by: Arnold Moyaux <arm@odoo.com>
fw-bot
pushed a commit
to odoo-dev/odoo
that referenced
this pull request
Mar 1, 2024
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: e0e63be Co-authored-by: Arnold Moyaux <arm@odoo.com>
fw-bot
pushed a commit
to odoo-dev/odoo
that referenced
this pull request
Mar 1, 2024
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: e0e63be Co-authored-by: Arnold Moyaux <arm@odoo.com>
DavidFesquet
added a commit
to odoo-dev/odoo
that referenced
this pull request
Mar 4, 2024
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: e0e63be Co-authored-by: Arnold Moyaux <arm@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Mar 4, 2024
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 #156063 X-original-commit: e0e63be Signed-off-by: David Fesquet (dafr) <dafr@odoo.com> Co-authored-by: Arnold Moyaux <arm@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Mar 5, 2024
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 #156045 X-original-commit: e0e63be Signed-off-by: David Fesquet (dafr) <dafr@odoo.com> Co-authored-by: Arnold Moyaux <arm@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Mar 5, 2024
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 #156035 X-original-commit: e0e63be Signed-off-by: David Fesquet (dafr) <dafr@odoo.com> Co-authored-by: Arnold Moyaux <arm@odoo.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps to reproduce:
Before this commit:
_compute_quantity
is called with the default rounding method, rounding quantity UP, which introduces reservation inconsistencies.After this commit:
_compute_quantity
rounds with the HALF-UP method, preventing rounding errors.Also, use the correct UoM in float comparisons.
opw-3601737