You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when the Next Invoice Date [recurring_next_date] field value is empty.
To Reproduce
Affected versions: 16.0
Steps to reproduce the behavior:
Create a subscription and set value for fields.
Change the stage to "In progress" by clicking on the status bar. The field "Next Invoice Date" appears.
Empty the value of "Next Invoice Date", the field disappears permanently.
When the subscription cron running or when pressing the button "Create invoice", face the error below:
File ".../oca-contract/subscription_oca/models/sale_subscription.py", line 219, in calculate_recurring_next_date
self.recurring_next_date = start_date + relativedelta(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta'
So there are two issues when the "Next Invoice Date" value is empty:
The field "Next Invoice Date" disappears permanently.
Error when creating subscription invoice (manually or cron).
Another weird behavior:
When clicking on the button "Close subscription", a popup appears to input the close reason, then I cancel the popup, and the "Next invoice date" value is emptied. Then the above issue happens.
Expected behavior
No error.
Either "Next Invoice Date" should not be emptied when the subscription is not closed or a value for "Next Invoice Date" is set automatically to avoid issues.
Module
subscription_oca
Describe the bug
Error when the Next Invoice Date [recurring_next_date] field value is empty.
To Reproduce
Affected versions: 16.0
Steps to reproduce the behavior:
So there are two issues when the "Next Invoice Date" value is empty:
Another weird behavior:
Expected behavior
Additional context
This is how the field is displayed on the view:
Workaround
Create a new subscription from scratch (duplicate subscription does not help).
The text was updated successfully, but these errors were encountered: