From 1eba6695bca7b9c8492aeaf9be8b47a16c7d9ae0 Mon Sep 17 00:00:00 2001 From: tarteo Date: Tue, 10 Sep 2024 10:01:39 +0200 Subject: [PATCH] [FIX] Set recurring next date before generating the invoice --- argocd_website/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/argocd_website/controllers/main.py b/argocd_website/controllers/main.py index 41dea45..5927828 100644 --- a/argocd_website/controllers/main.py +++ b/argocd_website/controllers/main.py @@ -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 @@ -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