diff --git a/l10n_br_account_payment_order/models/account_payment_order.py b/l10n_br_account_payment_order/models/account_payment_order.py index 47e0ccf3d894..c7ca8c7de5f5 100644 --- a/l10n_br_account_payment_order/models/account_payment_order.py +++ b/l10n_br_account_payment_order/models/account_payment_order.py @@ -107,6 +107,10 @@ def open2generated(self): payment_line.move_line_id.cnab_state = 'exporting_error' continue else: + for line in self.payment_line_ids: + if line.move_line_id: + line.move_line_id.bank_payment_line_id = \ + line.bank_line_id record.message_post(body='Arquivo gerado com sucesso.') return result