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

[16.0][IMP] sale_stock_available_to_promise_release mto availability_status #903

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

Conversation

santostelmo
Copy link
Contributor

When stock becomes available for is_mto product,, sale order line availability status should reflect that status.
Currently nothing happens in that circumstances as the status always stays in on_order even if there's stock available.

Also standard is already providing a computed field is_mto => _on_order_route can be dropped.

@santostelmo santostelmo changed the title [IMP] sale_stock_available_to_promise_release mto availability_status [16.0][IMP] sale_stock_available_to_promise_release mto availability_status May 22, 2024
Copy link
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

I would place it even after "restock"

@santostelmo
Copy link
Contributor Author

I would place it even after "restock"

But then if you have a unavailable mto product, you end up with restock status. It should be on_order in this case no ?

@jbaudoux
Copy link
Contributor

I would place it even after "restock"

But then if you have a unavailable mto product, you end up with restock status. It should be on_order in this case no ?

You're right. Then drop the misplaced comment :)

@santostelmo santostelmo force-pushed the 16.0-imp-sale_stock_available_to_promise_release-mto-availability_status branch from 92996c6 to 1f6901b Compare May 22, 2024 09:55
@jbaudoux
Copy link
Contributor

@sebalix @mmequignon We did this change. Ok for you ?

Comment on lines +83 to +85
# On order product
elif self.is_mto:
availability_status = "on_order"
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be checked first ?
We might have MTO sale order lines availability status set to partial here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It depends what we want to show to the user first. I would show 1st partial (we are able to deliver some qty), 2nd on_order ( we have no quantity available and need to fully order it)

Copy link
Member

Choose a reason for hiding this comment

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

If mto, it's on order, period, whether you have stock or not.

Copy link
Member

Choose a reason for hiding this comment

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

If user wants smth else, he changes the route on the so line, and that's it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sale person wants to know if product is available to ship or if action is required to order it. Otherwise this status is useless for him.

Copy link
Member

Choose a reason for hiding this comment

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

If you want to display availability, then product shouldn't be MTO.
@jbaudoux @santostelmo can we discuss this ? I'm not sure to understand what we're solving here...

Copy link
Contributor

@jbaudoux jbaudoux May 22, 2024

Choose a reason for hiding this comment

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

@mmequignon For standard MTO products, it's on order when SO is draft but the status will update when the product is received and available.
Also, in case of MTO as MTS (MTO route that generates an orderpoint with min/max=0), then if you have stock because someone returned an MTO product, then you see if it is available when placing the SO

@jbaudoux
Copy link
Contributor

jbaudoux commented Jun 4, 2024

@mmequignon good for you?

@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). 🤖

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ready to merge stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants