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][IMP] stock_release_channel: Add a company setting to enable/disable recomputation of channel on release #861

Merged
merged 1 commit into from
May 28, 2024

Conversation

QuocDuong1306
Copy link

No description provided.

@OCA-git-bot
Copy link
Contributor

Hi @sebalix,
some modules you are maintaining are being modified, check this out!

stock_release_channel/views/res_company.xml Outdated Show resolved Hide resolved
stock_release_channel/static/description/index.html Outdated Show resolved Hide resolved
@jbaudoux
Copy link
Contributor

ping @QuocDuong1306

@jbaudoux
Copy link
Contributor

jbaudoux commented May 2, 2024

@QuocDuong1306 Can you fix the review remarks?

@QuocDuong1306 QuocDuong1306 force-pushed the 16.0-imp-stock_release_channel branch from 180ad8c to 2de50bf Compare May 5, 2024 09:23
@QuocDuong1306
Copy link
Author

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
Copy link
Contributor

@jbaudoux jbaudoux May 6, 2024

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

Suggested change
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()

Copy link
Author

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

@QuocDuong1306 QuocDuong1306 force-pushed the 16.0-imp-stock_release_channel branch from 2de50bf to b45796e Compare May 27, 2024 07:39
@jbaudoux
Copy link
Contributor

We need a test for recompute_channel_on_pickings_at_release

@QuocDuong1306 QuocDuong1306 force-pushed the 16.0-imp-stock_release_channel branch from b45796e to 08e1d1e Compare May 28, 2024 03:46
@QuocDuong1306 QuocDuong1306 force-pushed the 16.0-imp-stock_release_channel branch from 08e1d1e to 100c59f Compare May 28, 2024 03:54
@QuocDuong1306
Copy link
Author

Hello @jbaudoux , added test

@jbaudoux
Copy link
Contributor

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-861-by-jbaudoux-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 25ed8c4 into OCA:16.0 May 28, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 6a346db. 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants