Skip to content

Commit

Permalink
[FIX] Set recurring next date before generating the invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Sep 10, 2024
1 parent d84810d commit 1eba669
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion argocd_website/controllers/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import re

from odoo import _, api
from odoo import _, api, fields
from odoo.exceptions import ValidationError
from odoo.http import Controller, request, route

Expand Down Expand Up @@ -274,6 +274,7 @@ def signup(self, **post):
subscription.user_id = user

if not subscription.invoice_ids:
subscription.recurring_next_date = fields.Date.today()
subscription.generate_invoice()
subscription.invoice_ids.ensure_one()
invoice_id = subscription.invoice_ids.id
Expand Down

0 comments on commit 1eba669

Please sign in to comment.