-
-
Notifications
You must be signed in to change notification settings - Fork 182
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] stock_release_channel: Add a company setting to enable/disable recomputation of channel on release #861
[16.0][IMP] stock_release_channel: Add a company setting to enable/disable recomputation of channel on release #861
Conversation
Hi @sebalix, |
4de3025
to
180ad8c
Compare
ping @QuocDuong1306 |
@QuocDuong1306 Can you fix the review remarks? |
180ad8c
to
2de50bf
Compare
Hello @jbaudoux , I updated the PR |
@@ -16,7 +16,9 @@ def release_available_to_promise(self): | |||
# As moves can be merged (and then unlinked), we should ensure | |||
# they still exist. | |||
moves = self.exists() | |||
moves.picking_id.assign_release_channel() | |||
company = self.env.company |
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.
There is a company field on the move, you need to use that one
company = self.env.company | |
for company, imoves in groupby(moves, key=itemgetter("company_id")) | |
if company.recompute_channel_on_pickings_at_release: | |
moves = self.env['stock.move'].concat(*imoves) | |
moves.picking_id.assign_release_channel() |
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.
Thank @jbaudoux , I updated the PR
2de50bf
to
b45796e
Compare
We need a test for |
b45796e
to
08e1d1e
Compare
…recomputation of channel on release
08e1d1e
to
100c59f
Compare
Hello @jbaudoux , added test |
/ocabot merge minor |
This PR has the |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 6a346db. Thanks a lot for contributing to OCA. ❤️ |
No description provided.