-
-
Notifications
You must be signed in to change notification settings - Fork 58
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][MIG] coupon_multi_gift>loyalty_multi_gift: Migration to version 16.0 #181
Open
pilarvargas-tecnativa
wants to merge
7
commits into
OCA:16.0
Choose a base branch
from
Tecnativa:16.0-imp-loyalty_multi_gift
base: 16.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[16.0][MIG] coupon_multi_gift>loyalty_multi_gift: Migration to version 16.0 #181
pilarvargas-tecnativa
wants to merge
7
commits into
OCA:16.0
from
Tecnativa:16.0-imp-loyalty_multi_gift
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9047592
to
595f223
Compare
/ocabot migration coupon_multi_gift |
595f223
to
ced71cb
Compare
b6d64f8
to
e847210
Compare
chienandalu
reviewed
Jan 19, 2024
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.
@pilarvargas-tecnativa I just added a commit to avoid the bug we have when creating the multi-gift lines. Check it and update relaunch the sale_loyalty_multi_gift
CI
1 task
2013fb8
to
52b973b
Compare
@chienandalu I have incorporated here the test that checks the fix. |
Great 👍 |
- Added migration script - Adapt test - Adapt methods and views TT44321
In https://github.com/odoo/odoo/blob/69b1993fb45b76110c24f5189a0ecfe9eb59a2aa/addons/loyalty/models/loyalty_program.py#L409 there is a call convert_to_cache on reward_ids that causes that one2many create commands are called twice and thus we get a duplicated record as convert_to_cache executes the values commands. We need to trick the context in order to flag the calls and create the multi gift lines just once.
52b973b
to
20b91be
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supersedes: #162
cc @Tecnativa TT44321
@chienandalu please review