[FW][FIX] mrp: reservation rounding for under-consumption backorders#144620
Closed
[FW][FIX] mrp: reservation rounding for under-consumption backorders#144620
Conversation
Contributor
Contributor
Author
|
@mwath @clesgow cherrypicking of pull request #144176 failed. stdout: stderr: Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?). In the former case, you may want to edit this PR message as well. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
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: f6c15e1
b92d152 to
d2985e4
Compare
Contributor
|
robodoo r+ |
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: #144176