-
Notifications
You must be signed in to change notification settings - Fork 23.1k
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] purchase_stock, purchase_mrp: adjust the qty of purchased kit correctly #76965
Closed
DjamelTouati
wants to merge
1
commit into
odoo:12.0
from
odoo-dev:12.0-opw-2645719-adjust_qty_kit_correctly-otd
Closed
[FIX] purchase_stock, purchase_mrp: adjust the qty of purchased kit correctly #76965
DjamelTouati
wants to merge
1
commit into
odoo:12.0
from
odoo-dev:12.0-opw-2645719-adjust_qty_kit_correctly-otd
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
fmdl
reviewed
Sep 23, 2021
DjamelTouati
force-pushed
the
12.0-opw-2645719-adjust_qty_kit_correctly-otd
branch
from
September 23, 2021 07:12
79b12ee
to
0a51ad6
Compare
DjamelTouati
changed the title
[FIX] purchase_stock, purchase_mrp: Adjust the qty of purchased kit correctly
[FIX] purchase_stock, purchase_mrp: adjust the qty of purchased kit correctly
Sep 23, 2021
DjamelTouati
force-pushed
the
12.0-opw-2645719-adjust_qty_kit_correctly-otd
branch
from
September 23, 2021 09:46
0a51ad6
to
3783d17
Compare
amoyaux
reviewed
Sep 23, 2021
The same scenario in a sale order is correct. We should do the same |
DjamelTouati
force-pushed
the
12.0-opw-2645719-adjust_qty_kit_correctly-otd
branch
from
September 27, 2021 15:32
3783d17
to
eb77495
Compare
amoyaux
reviewed
Sep 28, 2021
amoyaux
reviewed
Sep 28, 2021
…orrectly Steps to reproduce the bug: - Create a BOM kit for “product K” with: - 2 * “product A” - 1 * “product B” - Create a PO for 1 unit of “product K” > confirm - A receipt delivery with 2 units of “product A” and 1 unit of B will be created - Modify the ordered Qty to 2 units of “Product K” Problem: The receipt delivery will not be updated correctly (4 units of product A and 3 of product B) because the `"_prepare_stock_moves"` function computed the previous quantity wrong based on the moves quantities since the moves are for products A and B, not product F.(do not take into account the products in kit) Solution: For kit products, do not calculate from the `"stock.move"`, calculate the difference between the quantity before and after the change opw-2645719
DjamelTouati
force-pushed
the
12.0-opw-2645719-adjust_qty_kit_correctly-otd
branch
from
September 28, 2021 15:47
eb77495
to
509db23
Compare
robodoo r+ |
robodoo
pushed a commit
that referenced
this pull request
Sep 30, 2021
…orrectly Steps to reproduce the bug: - Create a BOM kit for “product K” with: - 2 * “product A” - 1 * “product B” - Create a PO for 1 unit of “product K” > confirm - A receipt delivery with 2 units of “product A” and 1 unit of B will be created - Modify the ordered Qty to 2 units of “Product K” Problem: The receipt delivery will not be updated correctly (4 units of product A and 3 of product B) because the `"_prepare_stock_moves"` function computed the previous quantity wrong based on the moves quantities since the moves are for products A and B, not product F.(do not take into account the products in kit) Solution: For kit products, do not calculate from the `"stock.move"`, calculate the difference between the quantity before and after the change opw-2645719 closes #76965 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This was referenced Sep 30, 2021
This pull request has forward-port PRs awaiting action (not merged or closed): #77622 |
This pull request has forward-port PRs awaiting action (not merged or closed): #77706 |
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 the bug:
Problem:
The receipt delivery will not be updated correctly (4 units of product A and 3 of product B)
because the
"_prepare_stock_moves"
function computed the previous quantity wrong based on the moves quantitiessince the moves are for products A and B, not product F.(do not take into account the products in kit)
Solution:
For kit products, do not calculate from the
"stock.move"
, calculate the difference between the quantity before and after the changeopw-2645719
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr