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

Merged
merged 7 commits into from
Jul 11, 2024

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
15 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.
@pilarvargas-tecnativa pilarvargas-tecnativa force-pushed the 16.0-imp-loyalty_multi_gift branch from 52b973b to 20b91be Compare April 25, 2024 07:18
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-181-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d52e74c into OCA:16.0 Jul 11, 2024
4 of 5 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 74a28ad. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 16.0-imp-loyalty_multi_gift branch July 11, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants