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

[FIX] membership_extension: support restarted memberships #191

Conversation

yajo
Copy link
Member

@yajo yajo commented Dec 18, 2024

When a membership got cancelled and, later, restarted, we still had a cancellation date set, leading to the sensation that it was still cancelled.

With this refactor, when a cancellation date is earlier than a future start date, cancellation info is removed from the partner.

Before:
image

After:
image

BTW I improved a few things:

  • Removed old dead code that is no longer necessary in v16.
  • Fix a test that was checking what happened when a membership line was cancelled before its start date. It seems a wrong use case because memberships are only supposed to be cancelled during the membership, and not before starting it.
  • Free members need to be considered members too.
  • Migration script.

@moduon MT-8237

When a membership got cancelled and, later, restarted, we still had a cancellation date set, leading to the sensation that it was still cancelled.

With this refactor, when a cancellation date is earlier than a future start date, cancellation info is removed from the partner.

BTW I improved a few things:
- Removed old dead code that is no longer necessary in v16.
- Fix a test that was checking what happened when a membership line was cancelled before its start date. It seems a wrong use case because memberships are only supposed to be cancelled during the membership, and not before starting it.
- Free members need to be considered members too.
- Migration script.

@moduon MT-8237
@yajo yajo marked this pull request as draft December 20, 2024 11:54
Before this fix, when creating many memberships at once, only the last one was really created.

@moduon MT-8237
@yajo yajo marked this pull request as ready for review January 14, 2025 12:08
@rafaelbn rafaelbn requested a review from carmenbianca January 14, 2025 17:35
@rafaelbn rafaelbn added this to the 16.0 milestone Jan 14, 2025
@rafaelbn rafaelbn requested a review from chienandalu January 14, 2025 17:36
Copy link

@fcvalgar fcvalgar left a comment

Choose a reason for hiding this comment

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

Functional review,

LGTM, thank you @yajo.

image

Copy link
Member

@rafaelbn rafaelbn 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 patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-191-by-rafaelbn-bump-patch, awaiting test results.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit efda3d9 into OCA:16.0 Jan 21, 2025
7 checks passed
@yajo yajo deleted the 16.0-membership_extension-restarted_membership_is_not_cancelled branch January 22, 2025 10:48
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.

4 participants