[FW][FIX] mrp: reservation rounding for under-consumption backorders#145063
Closed
fw-bot wants to merge 1 commit intoodoo:masterfrom
Closed
[FW][FIX] mrp: reservation rounding for under-consumption backorders#145063fw-bot wants to merge 1 commit intoodoo:masterfrom
fw-bot wants to merge 1 commit intoodoo:masterfrom
Conversation
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 X-original-commit: 769e1ce
Contributor
Contributor
Author
|
@mwath @clesgow this PR targets master 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 |
Contributor
|
@fw-bot r+ |
robodoo
pushed a commit
that referenced
this pull request
Dec 6, 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 #145063 X-original-commit: 769e1ce Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com> Signed-off-by: Walravens Mathieu (wama) <wama@odoo.com>
This file contains hidden or 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
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_quantityis called with the default rounding method, rounding quantity UP, which introduces reservation inconsistencies.After this commit:
_compute_quantityrounds with the HALF-UP method, preventing rounding errors.Also, use the correct UoM in float comparisons.
opw-3601737
Forward-Port-Of: #144620
Forward-Port-Of: #144176