-
-
Notifications
You must be signed in to change notification settings - Fork 33
[16.0][IMP] stock_location_orderpoint: returns the ongoing replenishment moves. #52
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
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @mt-software-de, |
6b0193b
to
5244aff
Compare
b6af5b1
to
6328ebb
Compare
Some test was failing because the code saying "day +1" fails if we are the last day of a month.
…replenishment moves
6328ebb
to
f712e4b
Compare
I forced push to rebase to #54 |
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.
Thanks for your contribution, this is a good idea.
self.env["procurement.group"].with_context(from_orderpoint=True).run( | ||
procurements, raise_user_error=False | ||
) | ||
return self._after_replenishment() |
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.
I would rather move the logic for getting the current replenishment moves into here and then passing them on downwards, instead of getting them from the result of _after_replenishment
.
return self._after_replenishment() | |
replenishment_moves = self._get_current_replenishment_moves() | |
self._after_replenishment(replenishment_moves) | |
return replenishment_moves |
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.
You are right, this is probably better to put this logic there, I'll make a commit
…ng logic to main replenishment method
Make sure the replenishment method always returns its ongoing replenishment moves.
This is useful in case we want to add custom logic to the generated/updated replenishment moves. If the moves get returned, we do not need to make a second query to gather them afterwards.
This PR is based on #54