From eb8b1b767a166414cd009da0a0b7b93ccf1a109f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20L=C3=B3pez=20Ram=C3=ADrez?= Date: Fri, 20 Nov 2020 09:31:55 +0100 Subject: [PATCH] Fixed bad format date when no payment --- easy_my_coop/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop/models/account_invoice.py b/easy_my_coop/models/account_invoice.py index 2961085..4b60a9a 100644 --- a/easy_my_coop/models/account_invoice.py +++ b/easy_my_coop/models/account_invoice.py @@ -178,7 +178,7 @@ class AccountInvoice(models.Model): ): # take the effective date from the payment. # by default the confirmation date is the payment date - effective_date = datetime.now().strftime("%d/%m/%Y") + effective_date = datetime.now() if invoice.payment_move_line_ids: move_line = invoice.payment_move_line_ids[0]