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] [FIX] membership_prorate: Prevent error when using prorate with variable period without membership_prorate_variable_period module installed #179

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

ByteMeAsap
Copy link

This PR aims to solve an unwanted error coming up when using prorates

Steps to reproduce the error:

  1. Install membership_prorate and membership_variable_period modules that leads to auto installation of membership_prorate_variable_period module.
  2. Uninstall the membership_prorate_variable_period module (Users might do it as they want to use prorates with variable periods)
  3. Setup a product with Membership Type set as 'variable' and Prorate enabled
  4. Create a invoice with this product, the system would throw an error as
membership_prorate/models/account_move_line.py", line 29, in _prepare_invoice_line_prorate_vals
    if date_invoice < date_from:
TypeError: '<' not supported between instances of 'datetime.date' and 'bool'

@ByteMeAsap ByteMeAsap force-pushed the 16.0-fix-membership_prorate-for-variable-periods branch 4 times, most recently from 86cf6b6 to 7db3aff Compare October 11, 2024 08:26
…ble period without membership_prorate_variable_period module installed
@ByteMeAsap ByteMeAsap force-pushed the 16.0-fix-membership_prorate-for-variable-periods branch from 7db3aff to d6ead69 Compare October 11, 2024 08:28
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.

1 participant