Skip to content
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] purchase_stock: use correct picking when updating purchase qty #161700

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 12, 2024

Description of the issue/feature this PR addresses:

In systems were POs can have multiple open pickings, updating the Purchase quantities can lead to errors due to the current behaviour.

Current behavior before PR:

Before the fix, the picking used to create the new stock moves resulting from changes in the purchased quantity is simply taking the first available picking of the Purchase. This causes problems when you handle Purchase Orders with multiple open pickings, as the correct picking to use when the quantity is updated is not always taken.

Desired behavior after PR is merged:

After the fix we give priority to evaluate open pickings already related to the line we are updating. We fallback to the same behaviour as before is none is available.


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #161452

Before the fix, the picking used to create the new stock moves resulting
from changes in the purchased quantity is simply taking the first
available picking of the Purchase. This causes problems when you handle
Purchase Orders with multiple open pickings, as the correct picking to
use when the quantity is updated is not always taken.

After the fix we give priority to evaluate open pickings already related
to the line we are updating. We fallback to the same behaviour as before
is none is available.

X-original-commit: b333556
@robodoo
Copy link
Contributor

robodoo commented Apr 12, 2024

Pull request status dashboard.

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 12, 2024

This PR targets saas-16.4 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 12, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 12, 2024
robodoo pushed a commit that referenced this pull request Apr 22, 2024
Before the fix, the picking used to create the new stock moves resulting
from changes in the purchased quantity is simply taking the first
available picking of the Purchase. This causes problems when you handle
Purchase Orders with multiple open pickings, as the correct picking to
use when the quantity is updated is not always taken.

After the fix we give priority to evaluate open pickings already related
to the line we are updating. We fallback to the same behaviour as before
is none is available.

closes #161700

X-original-commit: b333556
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
@robodoo robodoo closed this Apr 22, 2024
@fw-bot fw-bot deleted the saas-16.4-16.0-fix-purchase_stock-update_purchase_qty-DFWT-fw branch May 6, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants