Skip to content

Commit e188820

Browse files
committed
Merge PR #4026 into 16.0
Signed-off-by rvalyi
2 parents 4fa2ae8 + ec4a6a6 commit e188820

23 files changed

+655
-178
lines changed

l10n_br_account_payment_brcobranca/README.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
==========================
62
Boletos e CNAB de cobrança
73
==========================
@@ -17,7 +13,7 @@ Boletos e CNAB de cobrança
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github
@@ -209,6 +205,11 @@ Known issues / Roadmap
209205
Changelog
210206
=========
211207

208+
16.0.6.0.0 (2025-09-02)
209+
-----------------------
210+
211+
- [REF] Alterado o Código de Multa de Char para Objeto/l10n_br_cnab.code
212+
212213
16.0.4.0.0 (2025-03-06)
213214
-----------------------
214215

l10n_br_account_payment_brcobranca/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"name": "Boletos e CNAB de cobrança",
77
"summary": "receivable Boletos and CNAB using the BRCobranca lib",
8-
"version": "16.0.5.2.0",
8+
"version": "16.0.6.0.0",
99
"license": "AGPL-3",
1010
"author": "Akretion, Odoo Community Association (OCA)",
1111
"maintainers": ["rvalyi", "mbcosta"],

l10n_br_account_payment_brcobranca/models/account_payment_line.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ def _prepare_bank_line_santander(self, cnab_config, linhas_pagamentos):
112112
cnab_config.write_off_devolution_number_of_days
113113
)
114114
# Os dados de multa e desconto também são obrigatórios no segmento R
115-
linhas_pagamentos["codigo_multa"] = cnab_config.boleto_fee_code or "0"
115+
linhas_pagamentos["codigo_multa"] = (
116+
cnab_config.boleto_fee_code_id.code or "0"
117+
)
116118
linhas_pagamentos["percentual_multa"] = cnab_config.boleto_fee_perc or 0.0
117119
if self.discount_value:
118120
linhas_pagamentos["data_desconto"] = self.date.strftime("%Y/%m/%d")
@@ -134,9 +136,10 @@ def prepare_bank_payment_line(self, bank_name_brcobranca):
134136

135137
# Cada Banco pode possuir seus Codigos de Instrução
136138
if self.instruction_move_code_id.code == cnab_config.sending_code_id.code:
137-
if cnab_config.boleto_fee_perc:
138-
linhas_pagamentos["codigo_multa"] = cnab_config.boleto_fee_code
139-
linhas_pagamentos["percentual_multa"] = cnab_config.boleto_fee_perc
139+
if cnab_config.boleto_fee_code_id:
140+
linhas_pagamentos["codigo_multa"] = cnab_config.boleto_fee_code_id.code
141+
if cnab_config.boleto_fee_perc:
142+
linhas_pagamentos["percentual_multa"] = cnab_config.boleto_fee_perc
140143

141144
if cnab_config.boleto_interest_perc:
142145
linhas_pagamentos["tipo_mora"] = cnab_config.boleto_interest_code

l10n_br_account_payment_brcobranca/static/description/index.html

Lines changed: 69 additions & 68 deletions
Large diffs are not rendered by default.

l10n_br_account_payment_brcobranca/tests/common.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ def setUpClass(cls):
330330
"boleto_protest_code_id": cls.env.ref(
331331
"l10n_br_account_payment_order.unicred_240_400_boleto_protest_code_2"
332332
),
333+
"boleto_fee_code_id": cls.env.ref(
334+
"l10n_br_account_payment_order.unicred_240_400_boleto_fee_code_2"
335+
),
333336
"boleto_interest_code": "2",
334337
"cnab_sequence_id": cls.cnab_seq_unicred,
335338
"own_number_sequence_id": cls.own_number_seq_unicred,
@@ -405,6 +408,10 @@ def setUpClass(cls):
405408
"write_off_code_id": cls.env.ref(
406409
"l10n_br_account_payment_order.brasil_400_instruction_02"
407410
),
411+
"boleto_fee_code_id": cls.env.ref(
412+
"l10n_br_account_payment_order.brasil_400_boleto_fee_code_9"
413+
),
414+
"boleto_fee_percent": False,
408415
},
409416
)
410417

@@ -427,6 +434,9 @@ def setUpClass(cls):
427434
"write_off_code_id": cls.env.ref(
428435
"l10n_br_account_payment_order.bradesco_400_instruction_02"
429436
),
437+
"boleto_fee_code_id": cls.env.ref(
438+
"l10n_br_account_payment_order.bradesco_400_boleto_fee_code_2"
439+
),
430440
},
431441
)
432442

@@ -451,6 +461,9 @@ def setUpClass(cls):
451461
"write_off_code_id": cls.env.ref(
452462
"l10n_br_account_payment_order.sicredi_240_instruction_02"
453463
),
464+
"boleto_fee_code_id": cls.env.ref(
465+
"l10n_br_account_payment_order.sicred_240_boleto_fee_code_2"
466+
),
454467
},
455468
)
456469

@@ -477,6 +490,9 @@ def setUpClass(cls):
477490
"write_off_code_id": cls.env.ref(
478491
"l10n_br_account_payment_order.santander_400_instruction_02"
479492
),
493+
"boleto_fee_code_id": cls.env.ref(
494+
"l10n_br_account_payment_order.cef_240_boleto_fee_code_0"
495+
),
480496
},
481497
)
482498

@@ -492,6 +508,9 @@ def setUpClass(cls):
492508
"boleto_discount_code_id": cls.env.ref(
493509
"l10n_br_account_payment_order.santander_240_boleto_discount_code_4"
494510
),
511+
"boleto_fee_code_id": cls.env.ref(
512+
"l10n_br_account_payment_order.febrabam_240_boleto_fee_code_2"
513+
),
495514
"boleto_interest_code": "2",
496515
"cnab_sequence_id": cls.cnab_seq_santander_240,
497516
"own_number_sequence_id": cls.own_number_seq_santander_240,
@@ -535,6 +554,9 @@ def setUpClass(cls):
535554
"write_off_code_id": cls.env.ref(
536555
"l10n_br_account_payment_order.ailos_instruction_02"
537556
),
557+
"boleto_fee_code_id": cls.env.ref(
558+
"l10n_br_account_payment_order.febrabam_240_boleto_fee_code_2"
559+
),
538560
},
539561
)
540562
cls.cnab_config_ailos.write(

l10n_br_account_payment_order/README.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
=======================
62
Brazilian Payment Order
73
=======================
@@ -17,7 +13,7 @@ Brazilian Payment Order
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github
@@ -242,7 +238,12 @@ Known issues / Roadmap
242238
Changelog
243239
=========
244240

245-
16.0.6.0.0 (2024-03-06)
241+
16.0.8.0.0 (2025-09-02)
242+
-----------------------
243+
244+
- [REF] Alterado o Código de Multa de Char para Objeto/l10n_br_cnab.code
245+
246+
16.0.6.0.0 (2025-03-06)
246247
-----------------------
247248

248249
- [REF] Alterado o Código de Protesto de Char para

l10n_br_account_payment_order/__manifest__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "Brazilian Payment Order",
7-
"version": "16.0.7.3.0",
7+
"version": "16.0.8.0.0",
88
"license": "AGPL-3",
99
"author": "KMEE, Akretion, Odoo Community Association (OCA)",
1010
"maintainers": ["mbcosta"],
@@ -58,6 +58,15 @@
5858
"data/cnab_codes/banco_santander_240_boleto_protest_code.xml",
5959
"data/cnab_codes/banco_sicred_240_boleto_protest_code.xml",
6060
"data/cnab_codes/banco_unicred_240_400_boleto_protest_code.xml",
61+
# Fee Code
62+
"data/cnab_codes/febraban_240_boleto_fee_code.xml",
63+
"data/cnab_codes/banco_bradesco_400_boleto_fee_code.xml",
64+
"data/cnab_codes/banco_cef_240_boleto_fee_code.xml",
65+
"data/cnab_codes/banco_do_brasil_400_boleto_fee_code.xml",
66+
"data/cnab_codes/banco_itau_400_240_boleto_fee_code.xml",
67+
"data/cnab_codes/banco_santander_400_boleto_fee_code.xml",
68+
"data/cnab_codes/banco_sicred_240_boleto_fee_code.xml",
69+
"data/cnab_codes/banco_unicred_240_400_boleto_fee_code.xml",
6170
# Wizards
6271
"wizards/account_payment_line_create_view.xml",
6372
"wizards/account_move_line_change.xml",
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!--
3+
Copyright (C) 2025-Today - Akretion (<http://www.akretion.com>).
4+
@author Magno Costa <[email protected]>
5+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
6+
-->
7+
<odoo noupdate="1">
8+
9+
<record id="bradesco_400_boleto_fee_code_0" model="l10n_br_cnab.code">
10+
<field name="name">Sem Multa</field>
11+
<field name="code">0</field>
12+
<field name="code_type">fee_code</field>
13+
<field
14+
name="bank_ids"
15+
eval="[Command.set([ref('l10n_br_base.res_bank_237')])]"
16+
/>
17+
<field
18+
name="payment_method_ids"
19+
eval="[Command.set([ref('payment_mode_type_cnab400')])]"
20+
/>
21+
</record>
22+
23+
<record id="bradesco_400_boleto_fee_code_2" model="l10n_br_cnab.code">
24+
<field name="name">Percentual</field>
25+
<field name="code">2</field>
26+
<field name="code_type">fee_code</field>
27+
<field
28+
name="bank_ids"
29+
eval="[Command.set([ref('l10n_br_base.res_bank_237')])]"
30+
/>
31+
<field
32+
name="payment_method_ids"
33+
eval="[Command.set([ref('payment_mode_type_cnab400')])]"
34+
/>
35+
</record>
36+
37+
</odoo>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!--
3+
Copyright (C) 2025-Today - Akretion (<http://www.akretion.com>).
4+
@author Magno Costa <[email protected]>
5+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
6+
-->
7+
<odoo noupdate="1">
8+
9+
<record id="cef_240_boleto_fee_code_0" model="l10n_br_cnab.code">
10+
<field name="name">Sem Multa</field>
11+
<field name="code">0</field>
12+
<field name="code_type">fee_code</field>
13+
<field
14+
name="bank_ids"
15+
eval="[Command.set([ref('l10n_br_base.res_bank_104')])]"
16+
/>
17+
<field
18+
name="payment_method_ids"
19+
eval="[Command.set([ref('payment_mode_type_cnab240')])]"
20+
/>
21+
</record>
22+
23+
<record id="cef_240_boleto_fee_code_1" model="l10n_br_cnab.code">
24+
<field name="name">Valor Fixo</field>
25+
<field name="code">1</field>
26+
<field name="code_type">fee_code</field>
27+
<field
28+
name="bank_ids"
29+
eval="[Command.set([ref('l10n_br_base.res_bank_104')])]"
30+
/>
31+
<field
32+
name="payment_method_ids"
33+
eval="[Command.set([ref('payment_mode_type_cnab240')])]"
34+
/>
35+
</record>
36+
37+
<record id="cef_240_boleto_fee_code_2" model="l10n_br_cnab.code">
38+
<field name="name">Percentual</field>
39+
<field name="code">2</field>
40+
<field name="code_type">fee_code</field>
41+
<field
42+
name="bank_ids"
43+
eval="[Command.set([ref('l10n_br_base.res_bank_104')])]"
44+
/>
45+
<field
46+
name="payment_method_ids"
47+
eval="[Command.set([ref('payment_mode_type_cnab240')])]"
48+
/>
49+
</record>
50+
51+
</odoo>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!--
3+
Copyright (C) 2025-Today - Akretion (<http://www.akretion.com>).
4+
@author Magno Costa <[email protected]>
5+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
6+
-->
7+
<odoo noupdate="1">
8+
9+
<record id="brasil_400_boleto_fee_code_1" model="l10n_br_cnab.code">
10+
<field name="name">Valor Fixo</field>
11+
<field name="code">1</field>
12+
<field name="code_type">fee_code</field>
13+
<field
14+
name="bank_ids"
15+
eval="[Command.set([ref('l10n_br_base.res_bank_001')])]"
16+
/>
17+
<field
18+
name="payment_method_ids"
19+
eval="[Command.set([ref('payment_mode_type_cnab400')])]"
20+
/>
21+
</record>
22+
23+
<record id="brasil_400_boleto_fee_code_2" model="l10n_br_cnab.code">
24+
<field name="name">Percentual</field>
25+
<field name="code">2</field>
26+
<field name="code_type">fee_code</field>
27+
<field
28+
name="bank_ids"
29+
eval="[Command.set([ref('l10n_br_base.res_bank_001')])]"
30+
/>
31+
<field
32+
name="payment_method_ids"
33+
eval="[Command.set([ref('payment_mode_type_cnab400')])]"
34+
/>
35+
</record>
36+
37+
<record id="brasil_400_boleto_fee_code_9" model="l10n_br_cnab.code">
38+
<field name="name">Dispensar Cobrança de Multa.</field>
39+
<field name="code">9</field>
40+
<field name="code_type">fee_code</field>
41+
<field
42+
name="bank_ids"
43+
eval="[Command.set([ref('l10n_br_base.res_bank_001')])]"
44+
/>
45+
<field
46+
name="payment_method_ids"
47+
eval="[Command.set([ref('payment_mode_type_cnab400')])]"
48+
/>
49+
</record>
50+
51+
</odoo>

0 commit comments

Comments
 (0)