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][MIG] stock_buffer_route #351

Merged
merged 29 commits into from Dec 5, 2023

Conversation

BernatPForgeFlow
Copy link
Member

No description provided.

guewen and others added 29 commits November 29, 2023 17:05
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.
@LoisRForgeFlow
Copy link
Contributor

/ocabot migration stock_buffer_route

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Dec 4, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Dec 4, 2023
13 tasks
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a 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.

@LoisRForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-351-by-LoisRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 8ca901a into OCA:16.0 Dec 5, 2023
11 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 20b5db3. Thanks a lot for contributing to OCA. ❤️

@LoisRForgeFlow LoisRForgeFlow deleted the 16.0-mig-stock_buffer_route branch December 5, 2023 09:33
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.

None yet

10 participants