Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][REF] l10n_br_account_payment_order, l10n_br_account_payment_brcobranca: Unificando os Códigos CNAB em um único objeto #3337

Merged
merged 7 commits into from
Sep 11, 2024
7 changes: 4 additions & 3 deletions l10n_br_account_payment_brcobranca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "L10n Br Account Payment BRCobranca",
"version": "14.0.5.2.5",
"name": "Boletos e CNAB de cobrança",
"summary": "receivable Boletos and CNAB using the brcobranca lib",
"version": "14.0.6.0.0",
"license": "AGPL-3",
"author": "Akretion, " "Odoo Community Association (OCA)",
"author": "Akretion, Odoo Community Association (OCA)",
"maintainers": ["rvalyi", "mbcosta"],
"website": "https://github.com/OCA/l10n-brazil",
"depends": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ def prepare_bank_payment_line(self, bank_name_brcobranca):
bank_method(payment_mode_id, linhas_pagamentos)

# Cada Banco pode possuir seus Codigos de Instrução
if (
self.mov_instruction_code_id.code
== payment_mode_id.cnab_sending_code_id.code
):
if self.instruction_move_code_id.code == payment_mode_id.sending_code_id.code:
if payment_mode_id.boleto_fee_perc:
linhas_pagamentos["codigo_multa"] = payment_mode_id.boleto_fee_code
linhas_pagamentos["percentual_multa"] = payment_mode_id.boleto_fee_perc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _prepare_remessa_banco_brasil(self, remessa_values, cnab_type):
def _prepare_remessa_santander(self, remessa_values, cnab_type):
remessa_values.update(
{
"codigo_carteira": self.payment_mode_id.boleto_wallet_code_id.code,
"codigo_carteira": self.payment_mode_id.wallet_code_id.code,
"codigo_transmissao": self.payment_mode_id.cnab_company_bank_code,
"conta_corrente": misc.punctuation_rm(
self.journal_id.bank_account_id.acc_number
Expand Down
7 changes: 3 additions & 4 deletions l10n_br_account_payment_brcobranca/parser/cnab_file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ def process_return_file(self, data):

# Codigos de Movimento de Retorno - Liquidação
cnab_liq_move_code = []
for (
move_code
) in account_move_line.payment_mode_id.cnab_liq_return_move_code_ids:
for move_code in account_move_line.payment_mode_id.liq_return_move_code_ids:
cnab_liq_move_code.append(move_code.code)

favored_bank_account = (
Expand Down Expand Up @@ -388,11 +386,12 @@ def process_return_file(self, data):
return result_row_list

def _get_description_occurrence(self, payment_method_cnab, cod_ocorrencia):
cnab_return_move_code = self.env["l10n_br_cnab.return.move.code"].search(
cnab_return_move_code = self.env["l10n_br_cnab.code"].search(
[
("bank_ids", "in", self.bank.id),
("payment_method_ids", "in", payment_method_cnab.id),
("code", "=", cod_ocorrencia),
("code_type", "=", "return_move_code"),
]
)
if cnab_return_move_code:
Expand Down
4 changes: 3 additions & 1 deletion l10n_br_account_payment_order/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Brazilian Payment Order",
"version": "14.0.5.4.2",
"version": "14.0.6.0.0",
"license": "AGPL-3",
"author": "KMEE, Akretion, Odoo Community Association (OCA)",
"maintainers": ["mbcosta"],
Expand Down Expand Up @@ -51,6 +51,8 @@
"views/l10n_br_cnab_mov_instruction_code_view.xml",
"views/account_move_view.xml",
"views/l10n_br_cnab_boleto_wallet_code_view.xml",
# Códigos CNAB
"views/l10n_br_cnab_code_view.xml",
],
"demo": [
"demo/account_payment_method.xml",
Expand Down
Loading
Loading