Skip to content

[16.0][FIX] stock_release_channel_partner_by_date: properly detect the exception #999

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

Open
wants to merge 4 commits into
base: 16.0
Choose a base branch
from

Conversation

jbaudoux
Copy link
Contributor

@jbaudoux jbaudoux commented Mar 27, 2025

Fixing compatibility with:

  • FIXED stock_release_channel_shipment_lead_time => TEST missing
  • TODO stock_release_channel_partner_public_holidays
  • TODO stock_release_channel_partner_delivery_window

cc @sebalix @santostelmo

jbaudoux and others added 2 commits March 27, 2025 17:55
When searching a channel for a picking, if the channel has a warehouse
then it must match otherwise the picking type must match
@OCA-git-bot
Copy link
Contributor

Hi @mt-software-de, @sebalix,
some modules you are maintaining are being modified, check this out!

@jbaudoux jbaudoux force-pushed the 16.0-imp-stock_release_channel_partner_by_date-enforce_specific_channel_partner_date branch from be5b179 to c6be5de Compare March 27, 2025 17:51
Ensure warehouse is set on test channels
@jbaudoux jbaudoux force-pushed the 16.0-imp-stock_release_channel_partner_by_date-enforce_specific_channel_partner_date branch from c6be5de to 69488de Compare March 27, 2025 17:53
Fix compatilibity with stock_release_channel_partner_by_date.
Domain must apply on channel so that we don't restrict partner specific
channels.
@jbaudoux jbaudoux added work in progress no stale Use this label to prevent the automated stale action from closing this PR/Issue. labels Mar 31, 2025
Copy link
Contributor

@sebalix sebalix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG overall but still one question

@@ -111,16 +111,22 @@ def _get_release_channel_possible_candidate_domain_channel(self):
return [
("is_manual_assignment", "=", False),
("state", "!=", "asleep"),
"|",
("picking_type_ids", "=", False),
("picking_type_ids", "in", self.picking_type_id.ids),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it expected to use picking data in _get_release_channel_possible_candidate_domain_channel domain hook? I thought we designed it for basic criteria selection of the channel (like the ones already defined) without relying on current picking. For that we have _get_release_channel_possible_candidate_domain_picking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a domain to find out that the exception is valid for that warehouse & carrier but not picking type as it could be recomputed by the warehouse flow module.
I'll add docstring to those methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stale Use this label to prevent the automated stale action from closing this PR/Issue. work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants