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") )