-
-
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
[16.0][MIG] stock_buffer_route #351
Conversation
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 |
3f93a56
to
866b5ba
Compare
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.
Standard migration 👍
We'll forward port ongoing changes from v14 as they are merged.
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 20b5db3. Thanks a lot for contributing to OCA. ❤️ |
No description provided.