From 54d342e9bf2a0f9914116676bcf29c417962941e Mon Sep 17 00:00:00 2001 From: Renato Lima Date: Wed, 7 Oct 2020 12:04:31 -0300 Subject: [PATCH] [FIX] invoice without payment_mode_id --- l10n_br_account_payment_order/models/account_invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/l10n_br_account_payment_order/models/account_invoice.py b/l10n_br_account_payment_order/models/account_invoice.py index 63aa7e8ca4d4..4430543b5b42 100644 --- a/l10n_br_account_payment_order/models/account_invoice.py +++ b/l10n_br_account_payment_order/models/account_invoice.py @@ -145,11 +145,13 @@ def _pos_action_move_create(self): # ocorre da linha vir vazia o que impede de entrar no FOR # abaixo causando o não preenchimento de dados usados no Boleto, # isso deve ser melhor investigado + if not inv.payment_mode_id: + continue inv._compute_receivables() # Verifica se gera Ordem de Pagamento if not inv.payment_mode_id.payment_order_ok: - return + continue for index, interval in enumerate(inv.move_line_receivable_ids): inv_number = inv.get_invoice_fiscal_number().split('/')[-1].zfill(8)