-
-
Notifications
You must be signed in to change notification settings - Fork 199
[16.0][IMP] stock_release_channel_partner_by_date: enforce specific channel partner date #998
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
stock_release_channel_partner_by_date/tests/test_release_channel_partner_date.py
Outdated
Show resolved
Hide resolved
17620a5
to
359a2d9
Compare
359a2d9
to
91112b4
Compare
… in default channel
def _find_release_channel_possible_candidate(self): | ||
channels = super()._find_release_channel_possible_candidate() | ||
specific_channel = self.env["stock.release.channel.partner.date"].search( | ||
self._get_release_channel_partner_date_domain() |
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 doing the same as the method above except that you don't respect the company and warehouse. It is not the right approach
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.
Here is a proposal #999
I kept your test but added the warehouse as you changed the picking type so that it properly detects it's an exception valid for the picking's warehouse
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.
Note that the carrier must also be valid is you have stock_release_channel_delivery
. That's why we use _get_release_channel_possible_candidate_domain_picking()
and not only _get_release_channel_partner_date_domain()
# Then delivery gets the default channel | ||
# Then delivery does not fallback in any other channel | ||
self.env["stock.release.channel"].assign_release_channel(picking_out) | ||
self.assertEqual(picking_out.release_channel_id, self.default_channel) | ||
self.assertFalse(picking_out.release_channel_id) |
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.
This is a change of behavior.
If we set an exception, it is only valid for a defined carrier.
We shouldn't change that.
We should prevent to have an specific channel on the SO that is not in line with the SO carrier.
No description provided.