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

[18.0][MIG] membership_variable_period: Migration to 18.0 #201

Open
wants to merge 43 commits into
base: 18.0
Choose a base branch
from

Conversation

BhaveshHeliconia
Copy link

@BhaveshHeliconia BhaveshHeliconia commented Feb 20, 2025

pedrobaeza and others added 30 commits February 20, 2025 16:39
Variable period for memberships
===============================

Current membership module allows to set products that define a fixed period
for a membership. This is good when the quotas are defined periodically, and
when you become a member, you are until the end of that quota cycle.

But a lot of times, membership quotas express an amount of time that you
gain the membership. For example, one year since the subscription.

This module allows to make it in Odoo, using current membership features,
and adapting them for this purpose. As now the quota is not attached to a fixed
period, you can also invoice more than one quantity for being a member for
the corresponding number of periods.

Finally, a cron has been included that triggers the recalculation of the
membership state, allowing to have "old members", which doesn't work well
on standard.

Usage
=====

Define a member product, and select 'Variable periods' in the field
*Membership type*. You will be able to select them the period for the
membership in quantity and interval.

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>

[UPD] Update membership_variable_period.pot

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>

[UPD] Update membership_variable_period.pot

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: vertical-association-12.0/vertical-association-12.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-12-0/vertical-association-12-0-membership_variable_period/
Signed-off-by: Carmen Bianca Bakker <[email protected]>

[UPD] README.rst

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-12.0/vertical-association-12.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-12-0/vertical-association-12-0-membership_variable_period/pt_BR/
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>

[UPD] Update membership_variable_period.pot

Signed-off-by: Carmen Bianca Bakker <[email protected]>

[UPD] README.rst

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>

[UPD] Update membership_variable_period.pot

Signed-off-by: Carmen Bianca Bakker <[email protected]>

[UPD] README.rst

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/it/
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/it/
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/es/
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/pt/
carmenbianca and others added 13 commits February 20, 2025 16:39
…elds are always truthy

This is an additional sanity check to make sure that fields that are
expected to be available are actually available.

The situation here is a little tricky. Especially as pertains date_from
and date_to; these fields are `required=True` nowhere. Not on the
product, not on the membership invoice, and not on the membership line.
However, they _are_ set as required in the product and membership line
views. If these values are ever empty, it's a sure sign that something
went wrong somewhere, because the user should not be able to reach such
a state via the UI.

One sure way to reach that state was via the demo data, however, which
had no start and end dates. This is now fixed.

The situation for the variable period fields is similar. These fields
should never be empty when the membership type is variable, and it's not
typically possible to empty these values via the UI. For convenience's
sake, I simply set them to required an sich, with a default value.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/fr/
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/pt_BR/
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/ca/
Currently translated at 100.0% (12 of 12 strings)

Translation: vertical-association-16.0/vertical-association-16.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_variable_period/ca/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: vertical-association-17.0/vertical-association-17.0-membership_variable_period
Translate-URL: https://translation.odoo-community.org/projects/vertical-association-17-0/vertical-association-17-0-membership_variable_period/
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.