-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
[15.0][MIG] stock_buffer_route #222
Merged
Merged
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
It serves the same purpose as stock_orderpoint_route in OCA/stock-logistics-warehouse, but for DDMRP buffers. When can select a route that will be used for moves created by a buffer.
Previously, only pull, pull/push rules with a source location equal or child of the buffer's location could be selected. Extend the the selection of routes to include: * Buy routes (they have no source location) * Manufacture routes with a source location equal or child of the buffer's location * Manufacture routes without source location
The previous domain for pull rule was comparing the parent location of the rules' source locations. It may work by chance in some cases, but doesn't seem accurate. We are looking for the rule that goes to the buffer, so we have to find the routes of the rules which destination matches the buffer's location or one of its parent location. In fact, it matches the domain of "StockRule._get_rule()". If it doesn't, the rule would not be applied. As the rule destination is mandatory, we don't need anymore an explicit check for the "manufacture" rules.
This new feature targets buffers of type 'distributed'. * Store the source location where the replenishment of a buffer should occur. * The source location is taken from the default first route, so we assume the default route is a replenishment, otherwise the computation is skipped. * When `stock_buffer_route` is installed, the route configured on the buffer is used to find the replenishment source location. * A computed field shows the free quantity in the replenishment source location. * When a buffer has no quantity in the replenishment source location, a new warning is displayed in the tree view. * A new option on the buffer profile limits the quantity that can be replenished in the procurement wizard to the actual free quantity in the replenishment source location. The quantity we can procure for this profile will be min(recommended quantity, free quantity). This is a huge win to avoid backorders for transfers created for replenishments: we create transfers only for the quantity we have, and if we do not have this quantity in practice, it reveals a stock issue.
/ocabot migration stock_buffer_route |
LoisRForgeFlow
approved these changes
Mar 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 03242c0. Thanks a lot for contributing to OCA. ❤️ |
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.
Standard Migration
@ForgeFlow