From 2aa95124086912ac4f87f16066949f315f154e39 Mon Sep 17 00:00:00 2001 From: Bernat Brunet Date: Tue, 5 Sep 2023 12:39:24 +0200 Subject: [PATCH] Fix bug that not llow to send or geneate e-invoices. --- invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index da3c433..818089e 100644 --- a/invoice.py +++ b/invoice.py @@ -260,6 +260,7 @@ class Invoice(metaclass=PoolMeta): # send facturae to service if not service and config.facturae_service: service = config.facturae_service + if service: if not self.invoice_facturae: facturae_content = self.get_facturae() self._validate_facturae(facturae_content) @@ -271,7 +272,7 @@ class Invoice(metaclass=PoolMeta): self.invoice_facturae = invoice_facturae self.save() - if self.invoice_facturae and service and service != 'only_file': + if self.invoice_facturae and service != 'only_file': with transaction.set_context( queue_scheduled_at=config.invoice_facturae_after): Invoice.__queue__.send_facturae(self, service)