From 364e55e0f25c7e733fa33bfd3df809c43a398020 Mon Sep 17 00:00:00 2001 From: Antonio Neto Date: Fri, 22 Mar 2024 10:38:07 -0300 Subject: [PATCH] [IMP] l10n_br_account_payment_order: add short name for 'boleto especies' --- .../models/account_move_line.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/l10n_br_account_payment_brcobranca/models/account_move_line.py b/l10n_br_account_payment_brcobranca/models/account_move_line.py index 31e57049f0e7..a6aa9230f817 100644 --- a/l10n_br_account_payment_brcobranca/models/account_move_line.py +++ b/l10n_br_account_payment_brcobranca/models/account_move_line.py @@ -6,6 +6,8 @@ from odoo import fields, models +from odoo.addons.l10n_br_account_payment.constants import get_boleto_especie_short_name + from ..constants.br_cobranca import DICT_BRCOBRANCA_CURRENCY, get_brcobranca_bank _logger = logging.getLogger(__name__) @@ -68,7 +70,10 @@ def send_payment(self): "documento_numero": move_line.document_number, "data_vencimento": move_line.date_maturity.strftime("%Y/%m/%d"), "data_documento": move_line.move_id.invoice_date.strftime("%Y/%m/%d"), - "especie": move_line.payment_mode_id.boleto_species, + "especie": move_line.currency_id.symbol, + "especie_documento": get_boleto_especie_short_name( + move_line.payment_mode_id.boleto_species + ), "moeda": DICT_BRCOBRANCA_CURRENCY["R$"], "aceite": move_line.payment_mode_id.boleto_accept, "sacado_endereco": (move_line.partner_id.street_name or "")