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

[FIX] stock_available_mrp: increment potencial_qty to immediately_usable_qty instead of replacing it #32

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

ACheung-FactorLibre
Copy link

When no potential quantities are available, the immediate usable quantity should not be set to zero. Instead, the potential quantity should be added to the immediate usable quantity, rather than replacing it. This ensures that the stock calculation reflects both values accurately, rather than incorrectly disregarding the potential quantity.

@ACheung-FactorLibre ACheung-FactorLibre force-pushed the 16.0-fix-stock_available_mrp-2 branch 3 times, most recently from d397b81 to 401f05b Compare December 9, 2024 16:55
@ACheung-FactorLibre ACheung-FactorLibre force-pushed the 16.0-fix-stock_available_mrp-2 branch from 401f05b to 0d299a1 Compare December 9, 2024 17:01
Copy link

@aitoreizmendi aitoreizmendi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rousseldenis rousseldenis linked an issue Dec 10, 2024 that may be closed by this pull request
@ACheung-FactorLibre ACheung-FactorLibre marked this pull request as ready for review December 10, 2024 12:40
@serCliff
Copy link

As I could verify, the value now is correct because it takes the stock on hand of the warehouse plus the potential to calculate the stock on hand (additionally, the system uses the outgoing and incoming stock to get the final value).

I will explain it with an example:

Important: In my configuration, the available to promise excludes incoming stock image

I have a product (5019) which has a BoM (bunch of materials) to produce 240 units. and it has enough stock to produce only one BoM, exactly 240 units. of the final product

As we can see, the Available to Promise (Disponible para prometer) was calculated taking stock on hand - outgoing + potential

The expected result is:

image

The result is:

image

LGTM

Copy link

@serCliff serCliff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More info: #32 (comment)

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@ACheung-FactorLibre
Copy link
Author

Hi @rousseldenis @leemannd,

Could you please review this?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Available and Potential not displaying correct qtys
4 participants