Skip to content

Commit

Permalink
[FIX] invoice without payment_mode_id
Browse files Browse the repository at this point in the history
  • Loading branch information
renatonlima committed Oct 7, 2020
1 parent ad3916c commit 54d342e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion l10n_br_account_payment_order/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 54d342e

Please sign in to comment.