From cbe73a4053b4ef077d80481d9f953e177e970618 Mon Sep 17 00:00:00 2001 From: Juliana <juliana@le-filament.com> Date: Wed, 15 Jun 2022 17:38:00 +0200 Subject: [PATCH] [ADD]Consider state in app --- services/operation_services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/operation_services.py b/services/operation_services.py index 07ed716..5dd7a46 100644 --- a/services/operation_services.py +++ b/services/operation_services.py @@ -196,7 +196,7 @@ class OperationsService(Component): if type == "invoice": # Récupération de toutes les factures liées à l'opération spécifiée acc_account_ids = self.env["acc.account"].sudo().search( - [("acc_operation_id", "=", _id)] + [("acc_operation_id", "=", _id), ("state", "=", "published")] ) datas["documents"] = acc_account_ids.mapped(lambda n: { -- GitLab