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][MIG] coupon_multi_gift>loyalty_multi_gift: Migration to version 16.0 #181

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

Conversation

pilarvargas-tecnativa
Copy link
Contributor

Supersedes: #162

cc @Tecnativa TT44321

@chienandalu please review

@pedrobaeza
Copy link
Member

/ocabot migration coupon_multi_gift

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Nov 22, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 22, 2023
14 tasks
@pilarvargas-tecnativa pilarvargas-tecnativa force-pushed the 16.0-imp-loyalty_multi_gift branch 6 times, most recently from b6d64f8 to e847210 Compare January 16, 2024 18:13
Copy link
Member

@chienandalu chienandalu left a 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

@pilarvargas-tecnativa
Copy link
Contributor Author

@chienandalu I have incorporated here the test that checks the fix.

@chienandalu
Copy link
Member

Great 👍

chienandalu and others added 7 commits April 25, 2024 09:10
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants