-
-
Notifications
You must be signed in to change notification settings - Fork 193
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][FIX] sale_stock_release_channel_partner_by_date: Avoid release channel reset #954
base: 16.0
Are you sure you want to change the base?
Conversation
Hi @sebalix, |
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.
A test to reproduce the issue is welcome
I fixed the PR title, the commit should be fixed too (wrong module mentioned) |
if channel_date: | ||
rec.release_channel_id = channel_date.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.
if channel_date: | |
rec.release_channel_id = channel_date.release_channel_id | |
forced_release_channel_id = self.env.context.get("order_release_channel_id", {}).get(rec.id) | |
if not channel_date and forced_release_channel_id: | |
rec.release_channel_id = forced_release_channel_id | |
continue | |
rec.release_channel_id = channel_date.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.
That implementation doesn't seem to be possible:
- I don't know why but context variable passed in create order_release_channel_id never reach
_compute_release_channel_id
- We can't know the id of the record before creating it.
436f75f
to
2e063d7
Compare
2e063d7
to
3907eac
Compare
Avoid release channel reset when creating a SO.
Steps to replicate:
Results: on save, release channel is reset to empty
Expected behavior: on save, the release channel is kept