From b79959086b3eb2ab4ea48ee5caf6198253f98ea7 Mon Sep 17 00:00:00 2001 From: Wesley Oliveira Date: Thu, 16 Jan 2025 10:59:56 -0300 Subject: [PATCH] [FIX] l10n_br_contract: fix contracts with section or notes lines --- l10n_br_contract/models/contract_contract.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/l10n_br_contract/models/contract_contract.py b/l10n_br_contract/models/contract_contract.py index 6eaa0e10788b..f3853bd9d615 100644 --- a/l10n_br_contract/models/contract_contract.py +++ b/l10n_br_contract/models/contract_contract.py @@ -126,6 +126,12 @@ def _prepare_recurring_invoices_values(self, date_ref=False): if isinstance(inv_line[2], list): continue + contract_line_id = self.env["contract.line"].browse( + inv_line[2].get("contract_line_id") + ) + if not contract_line_id.create_invoice_visibility: + continue + operation_line_id = self.env["l10n_br_fiscal.operation.line"].browse( inv_line[2].get("fiscal_operation_line_id") )