19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:16 +01:00
parent 89c6e82fe7
commit 1b82c20a58
572 changed files with 43570 additions and 53303 deletions

View file

@ -6,36 +6,42 @@ Base module for the Brazilian localization
This module consists of:
- Generic Brazilian chart of accounts
- Brazilian taxes such as:
- Generic Brazilian chart of accounts
- Brazilian taxes such as:
- IPI
- ICMS
- PIS
- COFINS
- ISS
- IR
- IRPJ
- CSLL
- IPI
- ICMS
- PIS
- COFINS
- ISS
- IR
- CSLL
The field tax_discount has also been added in the account.tax.template and
account.tax objects to allow the proper computation of some Brazilian VATs
such as ICMS. The chart of account creation wizard has been extended to
propagate those new data properly.
- Document Types as NFC-e, NFS-e, etc.
- Identification Documents as CNPJ and CPF
It's important to note however that this module lack many implementations to
use Odoo properly in Brazil. Those implementations (such as the electronic
fiscal Invoicing which is already operational) are brought by more than 15
additional modules of the Brazilian Launchpad localization project
https://launchpad.net/openerp.pt-br-localiz and their dependencies in the
extra addons branch. Those modules aim at not breaking with the remarkable
Odoo modularity, this is why they are numerous but small. One of the
reasons for maintaining those modules apart is that Brazilian Localization
leaders need commit rights agility to complete the localization as companies
fund the remaining legal requirements (such as soon fiscal ledgers,
accounting SPED, fiscal SPED and PAF ECF that are still missing as September
2011). Those modules are also strictly licensed under AGPL V3 and today don't
come with any additional paid permission for online use of 'private modules'.
In addition to this module, the Brazilian Localizations is also
extended and complemented with several additional modules.
Brazil - Accounting Reports (l10n_br_reports)
---------------------------------------------
Adds a simple tax report that helps check the tax amount per tax group
in a given period of time. Also adds the P&L and BS adapted for the
Brazilian market.
Avatax Brazil (l10n_br_avatax)
------------------------------
Add Brazilian tax calculation via Avatax and all necessary fields needed to
configure Odoo in order to properly use Avatax and send the needed fiscal
information to retrieve the correct taxes.
Avatax for SOs in Brazil (l10n_br_avatax_sale)
----------------------------------------------
Same as the l10n_br_avatax module with the extension to the sales order module.
Electronic invoicing through Avatax (l10n_br_edi)
-------------------------------------------------
Create electronic sales invoices with Avatax.
## Installation
@ -46,36 +52,18 @@ pip install odoo-bringout-oca-ocb-l10n_br
## Dependencies
This addon depends on:
- account
- base_vat
## Manifest Information
- **Name**: Brazilian - Accounting
- **Version**: N/A
- **Category**: Accounting/Localizations/Account Charts
- **License**: LGPL-3
- **Installable**: False
- account_qr_code_emv
- base_address_extended
- l10n_latam_base
- l10n_latam_invoice_document
## Source
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_br`.
- Repository: https://github.com/OCA/OCB
- Branch: 19.0
- Path: addons/l10n_br
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md
This package preserves the original LGPL-3 license.

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 Renato Lima - Akretion
from . import controllers
from . import demo
from . import models
from . import wizard

View file

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 Renato Lima - Akretion
{
'name': 'Brazilian - Accounting',
'version': '1.1',
'website': 'https://www.odoo.com/documentation/latest/applications/finance/fiscal_localizations/brazil.html',
'icon': '/account/static/description/l10n.png',
'countries': ['br'],
'category': 'Accounting/Localizations/Account Charts',
'description': """
Base module for the Brazilian localization
@ -12,55 +12,76 @@ Base module for the Brazilian localization
This module consists of:
- Generic Brazilian chart of accounts
- Brazilian taxes such as:
- Generic Brazilian chart of accounts
- Brazilian taxes such as:
- IPI
- ICMS
- PIS
- COFINS
- ISS
- IR
- IRPJ
- CSLL
- IPI
- ICMS
- PIS
- COFINS
- ISS
- IR
- CSLL
The field tax_discount has also been added in the account.tax.template and
account.tax objects to allow the proper computation of some Brazilian VATs
such as ICMS. The chart of account creation wizard has been extended to
propagate those new data properly.
- Document Types as NFC-e, NFS-e, etc.
- Identification Documents as CNPJ and CPF
It's important to note however that this module lack many implementations to
use Odoo properly in Brazil. Those implementations (such as the electronic
fiscal Invoicing which is already operational) are brought by more than 15
additional modules of the Brazilian Launchpad localization project
https://launchpad.net/openerp.pt-br-localiz and their dependencies in the
extra addons branch. Those modules aim at not breaking with the remarkable
Odoo modularity, this is why they are numerous but small. One of the
reasons for maintaining those modules apart is that Brazilian Localization
leaders need commit rights agility to complete the localization as companies
fund the remaining legal requirements (such as soon fiscal ledgers,
accounting SPED, fiscal SPED and PAF ECF that are still missing as September
2011). Those modules are also strictly licensed under AGPL V3 and today don't
come with any additional paid permission for online use of 'private modules'.
In addition to this module, the Brazilian Localizations is also
extended and complemented with several additional modules.
Brazil - Accounting Reports (l10n_br_reports)
---------------------------------------------
Adds a simple tax report that helps check the tax amount per tax group
in a given period of time. Also adds the P&L and BS adapted for the
Brazilian market.
Avatax Brazil (l10n_br_avatax)
------------------------------
Add Brazilian tax calculation via Avatax and all necessary fields needed to
configure Odoo in order to properly use Avatax and send the needed fiscal
information to retrieve the correct taxes.
Avatax for SOs in Brazil (l10n_br_avatax_sale)
----------------------------------------------
Same as the l10n_br_avatax module with the extension to the sales order module.
Electronic invoicing through Avatax (l10n_br_edi)
-------------------------------------------------
Create electronic sales invoices with Avatax.
""",
'author': 'Akretion, Odoo Brasil',
'depends': ['account', 'base_vat'],
'depends': [
'account',
'account_qr_code_emv',
'base_address_extended',
'l10n_latam_base',
'l10n_latam_invoice_document',
],
'auto_install': ['account'],
'data': [
'data/l10n_br_chart_data.xml',
'data/account.account.template.csv',
'data/account_chart_template_data.xml',
'data/account_tax_group_data.xml',
'security/ir.model.access.csv',
'views/res_partner_views.xml',
'data/account_tax_report_data.xml',
'data/account_tax_template_data.xml',
'data/fiscal_templates_data.xml',
'data/account_fiscal_position_tax_template_data.xml',
'data/res_country_data.xml',
'data/res.city.csv',
'data/l10n_br.zip.range.csv',
'data/l10n_latam.identification.type.csv',
'data/l10n_latam.document.type.csv',
'views/account_view.xml',
'views/account_fiscal_position_views.xml',
'views/ir_ui_menu_brazil.xml',
'views/portal_address_templates.xml',
'views/res_company_views.xml',
'views/res_partner_views.xml',
'views/account_journal_views.xml',
'views/res_bank_views.xml',
],
'demo': [
'demo/demo_company.xml',
],
'assets': {
'web.assets_frontend': [
'l10n_br/static/src/interactions/**/*',
],
},
'license': 'LGPL-3',
}

View file

@ -0,0 +1,3 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import portal

View file

@ -0,0 +1,32 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.http import request
from odoo.addons.l10n_latam_base.controllers.portal import L10nLatamBasePortalAccount
class L10nBRPortalAccount(L10nLatamBasePortalAccount):
def _is_brazilean_fiscal_country(self):
return request.env.company.account_fiscal_country_id.code == 'BR'
def _prepare_address_form_values(self, partner_sudo, *args, **kwargs):
rendering_values = super()._prepare_address_form_values(partner_sudo, *args, **kwargs)
if self._is_brazilean_fiscal_country():
rendering_values.update({
'city_sudo': partner_sudo.city_id,
'cities_sudo': request.env['res.city'].sudo().search([
('country_id.code', '=', 'BR'),
]),
})
return rendering_values
def _get_mandatory_address_fields(self, country_sudo):
mandatory_fields = super()._get_mandatory_address_fields(country_sudo)
if country_sudo.code == 'BR' and self._is_brazilean_fiscal_country():
mandatory_fields.update({
'street_name', 'street2', 'street_number', 'city_id',
})
mandatory_fields -= {'street', 'city'} # Brazil uses the base_extended_address fields added above
return mandatory_fields

View file

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="br_3_01_01_05_01_47" model="account.account.template">
<field name="code">3.01.01.05.01.47</field>
<field name="name">Ganho Cambial</field>
<field name="account_type">income_other</field>
<field name="chart_template_id" ref="l10n_br_account_chart_template"/>
</record>
<record id="br_3_11_01_09_01_40" model="account.account.template">
<field name="code">3.11.01.09.01.40</field>
<field name="name">Perda Cambial</field>
<field name="account_type">expense</field>
<field name="chart_template_id" ref="l10n_br_account_chart_template"/>
</record>
<record id="l10n_br_account_chart_template" model="account.chart.template">
<field name="property_account_receivable_id" ref="account_template_101010401"/>
<field name="property_account_payable_id" ref="account_template_201010301"/>
<field name="property_account_expense_categ_id" ref="account_template_30101030101"/>
<field name="property_account_income_categ_id" ref="account_template_30101010105"/>
<field name="property_tax_payable_account_id" ref="account_template_202011003"/>
<field name="property_tax_receivable_account_id" ref="account_template_102010802"/>
<field name="income_currency_exchange_account_id" ref="br_3_01_01_05_01_47"/>
<field name="expense_currency_exchange_account_id" ref="br_3_11_01_09_01_40"/>
<field name="default_pos_receivable_account_id" ref="account_template_101010402"/>
<field name="account_journal_early_pay_discount_loss_account_id" ref="account_template_31101010202"/>
<field name="account_journal_early_pay_discount_gain_account_id" ref="account_template_30101050148"/>
</record>
</odoo>

View file

@ -1,107 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Sales within the same state -->
<record id="account_fiscal_position_same_state_sale1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_1"/>
<field name="tax_src_id" ref="tax_template_out_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_out_icms_interno17"/>
</record>
<!-- Purchases within the same state -->
<record id="account_fiscal_position_same_state_purchase1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_1"/>
<field name="tax_src_id" ref="tax_template_in_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_in_icms_interno17"/>
</record>
<!-- Foreign sales -->
<record id="account_fiscal_position_foreign_sale1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2"/>
<field name="tax_src_id" ref="tax_template_out_icms_interno17"/>
<field name="tax_dest_id" ref="tax_template_out_icms_externo"/>
</record>
<record id="account_fiscal_position_foreign_sale2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2"/>
<field name="tax_src_id" ref="tax_template_out_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_out_icms_externo"/>
</record>
<record id="account_fiscal_position_foreign_sale3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2"/>
<field name="tax_src_id" ref="tax_template_out_ipi10"/>
<field name="tax_dest_id" ref="tax_template_out_ipi"/>
</record>
<!-- Foreign purchases -->
<record id="account_fiscal_position_foreign_purchase1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2"/>
<field name="tax_src_id" ref="tax_template_in_icms_interno17"/>
<field name="tax_dest_id" ref="tax_template_in_icms_interno"/>
</record>
<record id="account_fiscal_position_foreign_purchase2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2"/>
<field name="tax_src_id" ref="tax_template_in_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_in_icms_externo"/>
</record>
<record id="account_fiscal_position_foreign_purchase3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_2"/>
<field name="tax_src_id" ref="tax_template_in_ipi10"/>
<field name="tax_dest_id" ref="tax_template_in_ipi"/>
</record>
<!-- Interstate sales between South/Southeast and North/Northeast/Midwest-->
<record id="account_fiscal_position_interstate_sale1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_ss_nnm"/>
<field name="tax_src_id" ref="tax_template_out_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_out_icms_externo7"/>
</record>
<record id="account_fiscal_position_interstate_sale2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_ss_nnm"/>
<field name="tax_src_id" ref="tax_template_out_icms_interno17"/>
<field name="tax_dest_id" ref="tax_template_out_icms_externo7"/>
</record>
<!-- Interstate purchases between South/Southeast and North/Northeast/Midwest-->
<record id="account_fiscal_position_interstate_purchase1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_ss_nnm"/>
<field name="tax_src_id" ref="tax_template_in_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_in_icms_externo7"/>
</record>
<record id="account_fiscal_position_interstate_purchase2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_ss_nnm"/>
<field name="tax_src_id" ref="tax_template_in_icms_interno17"/>
<field name="tax_dest_id" ref="tax_template_in_icms_externo7"/>
</record>
<!-- Interstate sales -->
<record id="account_fiscal_position_interstate_sale3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_interstate"/>
<field name="tax_src_id" ref="tax_template_out_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_out_icms_externo12"/>
</record>
<record id="account_fiscal_position_interstate_sale4" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_interstate"/>
<field name="tax_src_id" ref="tax_template_out_icms_interno17"/>
<field name="tax_dest_id" ref="tax_template_out_icms_externo12"/>
</record>
<!-- Interstate purchases -->
<record id="account_fiscal_position_interstate_purchase3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_interstate"/>
<field name="tax_src_id" ref="tax_template_in_icms_externo17"/>
<field name="tax_dest_id" ref="tax_template_in_icms_externo12"/>
</record>
<record id="account_fiscal_position_interstate_purchase4" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_interstate"/>
<field name="tax_src_id" ref="tax_template_in_icms_interno17"/>
<field name="tax_dest_id" ref="tax_template_in_icms_externo12"/>
</record>
</odoo>

View file

@ -1,303 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="tax_group_icms_0" model="account.tax.group">
<field name="name">ICMS 0%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_7" model="account.tax.group">
<field name="name">ICMS 7%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_12" model="account.tax.group">
<field name="name">ICMS 12%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_17" model="account.tax.group">
<field name="name">ICMS 17%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_irpj_0" model="account.tax.group">
<field name="name">IRPJ 0%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_0" model="account.tax.group">
<field name="name">PIS 0%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_065" model="account.tax.group">
<field name="name">PIS 0.65%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_0" model="account.tax.group">
<field name="name">COFINS 0%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_3" model="account.tax.group">
<field name="name">COFINS 3%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ir_0" model="account.tax.group">
<field name="name">IR 0%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_issqn_2" model="account.tax.group">
<field name="name">ISSQN 2%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_csll_0" model="account.tax.group">
<field name="name">CSLL 0%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ipi_0" model="account.tax.group">
<field name="name">IPI 0%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ipi_10" model="account.tax.group">
<field name="name">IPI 10%</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ii_0" model="account.tax.group">
<field name="name">II</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_inss_0" model="account.tax.group">
<field name="name">INSS</field>
<field name="country_id" ref="base.br"/>
</record>
<!-- New goods groups -->
<record id="tax_group_aproxtrib_fed_incl_goods" model="account.tax.group">
<field name="name">Tributação Federal Aproximada Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_aproxtrib_fed_excl_goods" model="account.tax.group">
<field name="name">Tributação Federal Aproximada Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_aproxtrib_state_incl_goods" model="account.tax.group">
<field name="name">Tributação Estadual Aproximada Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_aproxtrib_state_excl_goods" model="account.tax.group">
<field name="name">Tributação Estadual Aproximada Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_incl_goods" model="account.tax.group">
<field name="name">COFINS Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_excl_goods" model="account.tax.group">
<field name="name">COFINS Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_deson_incl_goods" model="account.tax.group">
<field name="name">COFINS Desoneração Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_deson_excl_goods" model="account.tax.group">
<field name="name">COFINS Desoneração Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_st_incl_goods" model="account.tax.group">
<field name="name">COFINS ST Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_cofins_st_excl_goods" model="account.tax.group">
<field name="name">COFINS ST Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_incl_goods" model="account.tax.group">
<field name="name">ICMS Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_excl_goods" model="account.tax.group">
<field name="name">ICMS Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_credsn_incl_goods" model="account.tax.group">
<field name="name">ICMS CredSN Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_credsn_excl_goods" model="account.tax.group">
<field name="name">ICMS CredSN Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_deson_incl_goods" model="account.tax.group">
<field name="name">ICMS Desoneração Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_deson_excl_goods" model="account.tax.group">
<field name="name">ICMS Desoneração Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_difa_dest_incl_goods" model="account.tax.group">
<field name="name">ICMS DIFA Destinatário Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_difa_dest_excl_goods" model="account.tax.group">
<field name="name">ICMS DIFA Destinatário Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_difa_fcp_incl_goods" model="account.tax.group">
<field name="name">ICMS DIFA FCP Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_difa_fcp_excl_goods" model="account.tax.group">
<field name="name">ICMS DIFA FCP Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_difa_remet_incl_goods" model="account.tax.group">
<field name="name">ICMS DIFA Remetente Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_difa_remet_excl_goods" model="account.tax.group">
<field name="name">ICMS DIFA Remetente Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_eff_incl_goods" model="account.tax.group">
<field name="name">ICMS EFF Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_eff_excl_goods" model="account.tax.group">
<field name="name">ICMS EFF Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_fcp_incl_goods" model="account.tax.group">
<field name="name">ICMS FCP Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_fcp_excl_goods" model="account.tax.group">
<field name="name">ICMS FCP Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_own_payer_incl_goods" model="account.tax.group">
<field name="name">ICMS Próprio Emitente Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_own_payer_excl_goods" model="account.tax.group">
<field name="name">ICMS Próprio Emitente Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_part_incl_goods" model="account.tax.group">
<field name="name">ICMS Partilha Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_part_excl_goods" model="account.tax.group">
<field name="name">ICMS Partilha Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_rf_incl_goods" model="account.tax.group">
<field name="name">ICMS RF Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_rf_excl_goods" model="account.tax.group">
<field name="name">ICMS RF Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_incl_goods" model="account.tax.group">
<field name="name">ICMS ST Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_excl_goods" model="account.tax.group">
<field name="name">ICMS ST Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_fcp_incl_goods" model="account.tax.group">
<field name="name">ICMS ST FCP Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_fcp_excl_goods" model="account.tax.group">
<field name="name">ICMS ST FCP Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_fcppart_incl_goods" model="account.tax.group">
<field name="name">ICMS ST FCP Partilha Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_fcppart_excl_goods" model="account.tax.group">
<field name="name">ICMS ST FCP Partilha Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_part_incl_goods" model="account.tax.group">
<field name="name">ICMS ST Partilha Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_part_excl_goods" model="account.tax.group">
<field name="name">ICMS ST Partilha Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_sd_incl_goods" model="account.tax.group">
<field name="name">ICMS ST SD Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_sd_excl_goods" model="account.tax.group">
<field name="name">ICMS ST SD Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_sd_fcp_incl_goods" model="account.tax.group">
<field name="name">ICMS ST SD FCP Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_icms_st_sd_fcp_excl_goods" model="account.tax.group">
<field name="name">ICMS ST SD FCP Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ii_incl_goods" model="account.tax.group">
<field name="name">II - Imposto de Importação Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ii_excl_goods" model="account.tax.group">
<field name="name">II - Imposto de Importação Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_iof_incl_goods" model="account.tax.group">
<field name="name">IOF - Imposto sobre Operações Financeiras Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_iof_excl_goods" model="account.tax.group">
<field name="name">IOF - Imposto sobre Operações Financeiras Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ipi_incl_goods" model="account.tax.group">
<field name="name">IPI Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ipi_excl_goods" model="account.tax.group">
<field name="name">IPI Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ipi_returned_incl_goods" model="account.tax.group">
<field name="name">IPI Retornado Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_ipi_returned_excl_goods" model="account.tax.group">
<field name="name">IPI Retornado Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_incl_goods" model="account.tax.group">
<field name="name">PIS Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_excl_goods" model="account.tax.group">
<field name="name">PIS Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_deson_incl_goods" model="account.tax.group">
<field name="name">PIS Desoneração Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_deson_excl_goods" model="account.tax.group">
<field name="name">PIS Desoneração Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_st_incl_goods" model="account.tax.group">
<field name="name">PIS ST Incl.</field>
<field name="country_id" ref="base.br"/>
</record>
<record id="tax_group_pis_st_excl_goods" model="account.tax.group">
<field name="name">PIS ST Excl.</field>
<field name="country_id" ref="base.br"/>
</record>
</data>
</odoo>

View file

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Fiscal Position Templates -->
<record id="fiscal_position_template_1" model="account.fiscal.position.template">
<field name="sequence">1</field>
<field name="name">Internal (within one state)</field>
<field name="chart_template_id" ref="l10n_br_account_chart_template"/>
<field name="auto_apply" eval="True"/>
<field name="vat_required" eval="True"/>
<field name="country_id" ref="base.br"/>
<field name="l10n_br_fp_type">internal</field>
</record>
<record id="fiscal_position_template_2" model="account.fiscal.position.template">
<field name="sequence">2</field>
<field name="name">Foreign</field>
<field name="chart_template_id" ref="l10n_br_account_chart_template"/>
<field name="auto_apply" eval="True"/>
</record>
<!-- South and Southeast company delivering to North, Northeast, and Midwest -->
<record id="fiscal_position_template_ss_nnm" model="account.fiscal.position.template">
<field name="sequence">3</field>
<field name="name">South and Southeast to North, Northeast, and Midwest</field>
<field name="chart_template_id" ref="l10n_br_account_chart_template"/>
<field name="auto_apply" eval="True"/>
<field name="vat_required" eval="True"/>
<field name="country_id" ref="base.br"/>
<field name="l10n_br_fp_type">ss_nnm</field>
</record>
<!-- Other interstate transactions -->
<record id="fiscal_position_template_interstate" model="account.fiscal.position.template">
<field name="sequence">4</field>
<field name="name">Interstate</field>
<field name="chart_template_id" ref="l10n_br_account_chart_template"/>
<field name="auto_apply" eval="True"/>
<field name="vat_required" eval="True"/>
<field name="country_id" ref="base.br"/>
<field name="l10n_br_fp_type">interstate</field>
</record>
<!-- Fiscal Position Account Templates -->
<record id="fiscal_position_account_template_2" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_2" />
<field name="account_src_id" ref="l10n_br.account_template_30101010105" />
<field name="account_dest_id" ref="l10n_br.account_template_30101010101" />
</record>
<record id="fiscal_position_account_template_3" model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_2" />
<field name="account_src_id" ref="l10n_br.account_template_30101010106" />
<field name="account_dest_id" ref="l10n_br.account_template_30101010103" />
</record>
</odoo>

File diff suppressed because it is too large Load diff

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="l10n_br_account_chart_template" model="account.chart.template">
<field name="name">Plano de Contas Brasileiro</field>
<field name="code_digits">6</field>
<field name="bank_account_code_prefix">1.01.01.02.00</field>
<field name="cash_account_code_prefix">1.01.01.01.00</field>
<field name="transfer_account_code_prefix">1.01.01.12.00</field>
<field name="currency_id" ref="base.BRL"/>
<field name="country_id" ref="base.br"/>
</record>
</odoo>

View file

@ -0,0 +1,32 @@
id,sequence,code,country_id/id,name,internal_type,doc_code_prefix,active
dt_55,10,55,base.br,Electronic Invoice (NF-e),all,NFe,True
dt_57,20,57,base.br,Electronic Bill of Lading (CT-e),invoice,CTe,False
dt_58,30,58,base.br,Electronic Manifesto of Tax Documents (MDF-e),invoice,MDFe,False
dt_59,40,59,base.br,Electronic Tax Coupon (CF-e-SAT),invoice,CFeS,False
dt_60,50,60,base.br,Electronic Tax Coupon (CF-e-ECF),invoice,CFeE,False
dt_65,60,65,base.br,Electronic Invoice to the Final Consumer (NFC-e),all,NFCe,True
dt_SE,70,SE,base.br,Electronic Service Invoice - NFS-e,all,NFSe,True
dt_01,80,01,base.br,Invoice 1 / 1A,all,NF,False
dt_1B,90,1B,base.br,Single invoice,all,NFA,False
dt_02,100,02,base.br,In-Consumer Sales Invoice,all,NFC,False
dt_2D,110,2D,base.br,Tax Coupon,invoice,CF,False
dt_2E,120,2E,base.br,Tax Coupon-Ticket,invoice,TIQP,False
dt_04,130,04,base.br,Invoice from Producer,invoice,NFP,False
dt_06,140,06,base.br,Nota Fiscal / Electricity Bill,invoice,NFCE,False
dt_07,150,07,base.br,Invoice for Transport Service,invoice,NFST,False
dt_08,160,08,base.br,Ground Bill of Lading,invoice,CTRC,False
dt_8B,170,8B,base.br,Loose Ground Bill of Lading,invoice,CTCA,False
dt_09,180,09,base.br,Maritime Bill of Lading,invoice,CTAC,False
dt_10,190,10,base.br,Aircraft Knowledge,invoice,CA,False
dt_11,200,11,base.br,Railway Bill of Lading,invoice,CTFC,False
dt_13,210,13,base.br,Road Ticket,invoice,BPR,False
dt_14,220,14,base.br,Waterway Ticket,invoice,BPA,False
dt_15,230,15,base.br,e-Baggage Ticket,invoice,BPNB,False
dt_16,240,16,base.br,Railway Ticket,invoice,BPF,False
dt_18,250,18,base.br,Daily Movement Summary,invoice,RMD,False
dt_21,260,21,base.br,Invoice for de-Communication Service,invoice,NFSC,False
dt_22,270,22,base.br,Invoice for Telecommunication Service,invoice,NFST,False
dt_26,280,26,base.br,Bill of Lading Multimodal Transport,invoice,CTMC,False
dt_27,290,27,base.br,Invoice for Rail Transport De-Cargo,invoice,NFTFC,False
dt_28,300,28,base.br,Invoice / Gas Supply Channel Account,invoice,NFCFGC,False
dt_29,310,29,base.br,Invoice / Water Supply Account,invoice,NFCFAC,False
1 id sequence code country_id/id name internal_type doc_code_prefix active
2 dt_55 10 55 base.br Electronic Invoice (NF-e) all NFe True
3 dt_57 20 57 base.br Electronic Bill of Lading (CT-e) invoice CTe False
4 dt_58 30 58 base.br Electronic Manifesto of Tax Documents (MDF-e) invoice MDFe False
5 dt_59 40 59 base.br Electronic Tax Coupon (CF-e-SAT) invoice CFeS False
6 dt_60 50 60 base.br Electronic Tax Coupon (CF-e-ECF) invoice CFeE False
7 dt_65 60 65 base.br Electronic Invoice to the Final Consumer (NFC-e) all NFCe True
8 dt_SE 70 SE base.br Electronic Service Invoice - NFS-e all NFSe True
9 dt_01 80 01 base.br Invoice 1 / 1A all NF False
10 dt_1B 90 1B base.br Single invoice all NFA False
11 dt_02 100 02 base.br In-Consumer Sales Invoice all NFC False
12 dt_2D 110 2D base.br Tax Coupon invoice CF False
13 dt_2E 120 2E base.br Tax Coupon-Ticket invoice TIQP False
14 dt_04 130 04 base.br Invoice from Producer invoice NFP False
15 dt_06 140 06 base.br Nota Fiscal / Electricity Bill invoice NFCE False
16 dt_07 150 07 base.br Invoice for Transport Service invoice NFST False
17 dt_08 160 08 base.br Ground Bill of Lading invoice CTRC False
18 dt_8B 170 8B base.br Loose Ground Bill of Lading invoice CTCA False
19 dt_09 180 09 base.br Maritime Bill of Lading invoice CTAC False
20 dt_10 190 10 base.br Aircraft Knowledge invoice CA False
21 dt_11 200 11 base.br Railway Bill of Lading invoice CTFC False
22 dt_13 210 13 base.br Road Ticket invoice BPR False
23 dt_14 220 14 base.br Waterway Ticket invoice BPA False
24 dt_15 230 15 base.br e-Baggage Ticket invoice BPNB False
25 dt_16 240 16 base.br Railway Ticket invoice BPF False
26 dt_18 250 18 base.br Daily Movement Summary invoice RMD False
27 dt_21 260 21 base.br Invoice for de-Communication Service invoice NFSC False
28 dt_22 270 22 base.br Invoice for Telecommunication Service invoice NFST False
29 dt_26 280 26 base.br Bill of Lading Multimodal Transport invoice CTMC False
30 dt_27 290 27 base.br Invoice for Rail Transport De-Cargo invoice NFTFC False
31 dt_28 300 28 base.br Invoice / Gas Supply Channel Account invoice NFCFGC False
32 dt_29 310 29 base.br Invoice / Water Supply Account invoice NFCFAC False

View file

@ -0,0 +1,3 @@
"id","name","country_id:id","is_vat","name@pt"
"cnpj","CNPJ","base.br","True","CNPJ"
"cpf","CPF","base.br","False","CPF"
1 id name country_id:id is_vat name@pt
2 cnpj CNPJ base.br True CNPJ
3 cpf CPF base.br False CPF

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="base.br" model="res.country">
<field name="address_view_id" ref="br_partner_address_form" />
</record>
</data>
</odoo>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,7 @@
"id","sequence","name","auto_apply","vat_required","country_id","l10n_br_fp_type","account_ids/account_src_id","account_ids/account_dest_id","name@pt"
"fiscal_position_template_1","1","Internal (within one state)","1","1","base.br","internal","","","Internal (within one state)"
"fiscal_position_template_2","2","Foreign","1","","","","","","Foreign"
"","","","","","","","account_template_30101010105","account_template_30101010101",""
"","","","","","","","account_template_30101010106","account_template_30101010103",""
"fiscal_position_template_ss_nnm","3","South and Southeast to North, Northeast, and Midwest","1","1","base.br","ss_nnm","","","South and Southeast to North, Northeast, and Midwest"
"fiscal_position_template_interstate","4","Interstate","1","1","base.br","interstate","","","Interstate"
1 id sequence name auto_apply vat_required country_id l10n_br_fp_type account_ids/account_src_id account_ids/account_dest_id name@pt
2 fiscal_position_template_1 1 Internal (within one state) 1 1 base.br internal Internal (within one state)
3 fiscal_position_template_2 2 Foreign 1 Foreign
4 account_template_30101010105 account_template_30101010101
5 account_template_30101010106 account_template_30101010103
6 fiscal_position_template_ss_nnm 3 South and Southeast to North, Northeast, and Midwest 1 1 base.br ss_nnm South and Southeast to North, Northeast, and Midwest
7 fiscal_position_template_interstate 4 Interstate 1 1 base.br interstate Interstate

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,161 @@
"id","name","country_id","tax_payable_account_id","tax_receivable_account_id","name@pt"
"tax_group_icms_0","ICMS 0%","base.br","account_template_202011003","account_template_102010802","ICMS 0%"
"tax_group_icms_7","ICMS 7%","base.br","account_template_202011003","account_template_102010802","ICMS 7%"
"tax_group_icms_12","ICMS 12%","base.br","account_template_202011003","account_template_102010802","ICMS 12%"
"tax_group_icms_17","ICMS 17%","base.br","account_template_202011003","account_template_102010802","ICMS 17%"
"tax_group_irpj_0","IRPJ 0%","base.br","account_template_202011003","account_template_102010802","IRPJ 0%"
"tax_group_pis_0","PIS 0%","base.br","account_template_202011003","account_template_102010802","PIS 0%"
"tax_group_pis_065","PIS 0.65%","base.br","account_template_202011003","account_template_102010802","PIS 0.65%"
"tax_group_cofins_0","COFINS 0%","base.br","account_template_202011003","account_template_102010802","COFINS 0%"
"tax_group_cofins_3","COFINS 3%","base.br","account_template_202011003","account_template_102010802","COFINS 3%"
"tax_group_ir_0","IR 0%","base.br","account_template_202011003","account_template_102010802","IR 0%"
"tax_group_issqn_2","ISSQN 2%","base.br","account_template_202011003","account_template_102010802","ISSQN 2%"
"tax_group_csll_0","CSLL 0%","base.br","account_template_202011003","account_template_102010802","CSLL 0%"
"tax_group_ipi_0","IPI 0%","base.br","account_template_202011003","account_template_102010802","IPI 0%"
"tax_group_ipi_10","IPI 10%","base.br","account_template_202011003","account_template_102010802","IPI 10%"
"tax_group_ii_0","II","base.br","account_template_202011003","account_template_102010802","II"
"tax_group_inss_0","INSS","base.br","account_template_202011003","account_template_102010802","INSS"
"tax_group_aproxtrib_fed_incl_goods","Tributação Federal Aproximada Incl.","base.br","account_template_202011003","account_template_102010802","Tributação Federal Aproximada Incl."
"tax_group_aproxtrib_fed_excl_goods","Tributação Federal Aproximada Excl.","base.br","account_template_202011003","account_template_102010802","Tributação Federal Aproximada Excl."
"tax_group_aproxtrib_state_incl_goods","Tributação Estadual Aproximada Incl.","base.br","account_template_202011003","account_template_102010802","Tributação Estadual Aproximada Incl."
"tax_group_aproxtrib_state_excl_goods","Tributação Estadual Aproximada Excl.","base.br","account_template_202011003","account_template_102010802","Tributação Estadual Aproximada Excl."
"tax_group_cofins_incl_goods","COFINS Incl.","base.br","account_template_202011003","account_template_102010802","COFINS Incl."
"tax_group_cofins_excl_goods","COFINS Excl.","base.br","account_template_202011003","account_template_102010802","COFINS Excl."
"tax_group_cofins_deson_incl_goods","COFINS Desoneração Incl.","base.br","account_template_202011003","account_template_102010802","COFINS Desoneração Incl."
"tax_group_cofins_deson_excl_goods","COFINS Desoneração Excl.","base.br","account_template_202011003","account_template_102010802","COFINS Desoneração Excl."
"tax_group_cofins_st_incl_goods","COFINS ST Incl.","base.br","account_template_202011003","account_template_102010802","COFINS ST Incl."
"tax_group_cofins_st_excl_goods","COFINS ST Excl.","base.br","account_template_202011003","account_template_102010802","COFINS ST Excl."
"tax_group_icms_incl_goods","ICMS Incl.","base.br","account_template_202011003","account_template_102010802","ICMS Incl."
"tax_group_icms_excl_goods","ICMS Excl.","base.br","account_template_202011003","account_template_102010802","ICMS Excl."
"tax_group_icms_credsn_incl_goods","ICMS CredSN Incl.","base.br","account_template_202011003","account_template_102010802","ICMS CredSN Incl."
"tax_group_icms_credsn_excl_goods","ICMS CredSN Excl.","base.br","account_template_202011003","account_template_102010802","ICMS CredSN Excl."
"tax_group_icms_deson_incl_goods","ICMS Desoneração Incl.","base.br","account_template_202011003","account_template_102010802","ICMS Desoneração Incl."
"tax_group_icms_deson_excl_goods","ICMS Desoneração Excl.","base.br","account_template_202011003","account_template_102010802","ICMS Desoneração Excl."
"tax_group_icms_difa_dest_incl_goods","ICMS DIFA Destinatário Incl.","base.br","account_template_202011003","account_template_102010802","ICMS DIFA Destinatário Incl."
"tax_group_icms_difa_dest_excl_goods","ICMS DIFA Destinatário Excl.","base.br","account_template_202011003","account_template_102010802","ICMS DIFA Destinatário Excl."
"tax_group_icms_difa_fcp_incl_goods","ICMS DIFA FCP Incl.","base.br","account_template_202011003","account_template_102010802","ICMS DIFA FCP Incl."
"tax_group_icms_difa_fcp_excl_goods","ICMS DIFA FCP Excl.","base.br","account_template_202011003","account_template_102010802","ICMS DIFA FCP Excl."
"tax_group_icms_difa_remet_incl_goods","ICMS DIFA Remetente Incl.","base.br","account_template_202011003","account_template_102010802","ICMS DIFA Remetente Incl."
"tax_group_icms_difa_remet_excl_goods","ICMS DIFA Remetente Excl.","base.br","account_template_202011003","account_template_102010802","ICMS DIFA Remetente Excl."
"tax_group_icms_eff_incl_goods","ICMS EFF Incl.","base.br","account_template_202011003","account_template_102010802","ICMS EFF Incl."
"tax_group_icms_eff_excl_goods","ICMS EFF Excl.","base.br","account_template_202011003","account_template_102010802","ICMS EFF Excl."
"tax_group_icms_fcp_incl_goods","ICMS FCP Incl.","base.br","account_template_202011003","account_template_102010802","ICMS FCP Incl."
"tax_group_icms_fcp_excl_goods","ICMS FCP Excl.","base.br","account_template_202011003","account_template_102010802","ICMS FCP Excl."
"tax_group_icms_own_payer_incl_goods","ICMS Próprio Emitente Incl.","base.br","account_template_202011003","account_template_102010802","ICMS Próprio Emitente Incl."
"tax_group_icms_own_payer_excl_goods","ICMS Próprio Emitente Excl.","base.br","account_template_202011003","account_template_102010802","ICMS Próprio Emitente Excl."
"tax_group_icms_part_incl_goods","ICMS Partilha Incl.","base.br","account_template_202011003","account_template_102010802","ICMS Partilha Incl."
"tax_group_icms_part_excl_goods","ICMS Partilha Excl.","base.br","account_template_202011003","account_template_102010802","ICMS Partilha Excl."
"tax_group_icms_rf_incl_goods","ICMS RF Incl.","base.br","account_template_202011003","account_template_102010802","ICMS RF Incl."
"tax_group_icms_rf_excl_goods","ICMS RF Excl.","base.br","account_template_202011003","account_template_102010802","ICMS RF Excl."
"tax_group_icms_st_incl_goods","ICMS ST Incl.","base.br","account_template_202011003","account_template_102010802","ICMS ST Incl."
"tax_group_icms_st_excl_goods","ICMS ST Excl.","base.br","account_template_202011003","account_template_102010802","ICMS ST Excl."
"tax_group_icms_st_fcp_incl_goods","ICMS ST FCP Incl.","base.br","account_template_202011003","account_template_102010802","ICMS ST FCP Incl."
"tax_group_icms_st_fcp_excl_goods","ICMS ST FCP Excl.","base.br","account_template_202011003","account_template_102010802","ICMS ST FCP Excl."
"tax_group_icms_st_fcppart_incl_goods","ICMS ST FCP Partilha Incl.","base.br","account_template_202011003","account_template_102010802","ICMS ST FCP Partilha Incl."
"tax_group_icms_st_fcppart_excl_goods","ICMS ST FCP Partilha Excl.","base.br","account_template_202011003","account_template_102010802","ICMS ST FCP Partilha Excl."
"tax_group_icms_st_part_incl_goods","ICMS ST Partilha Incl.","base.br","account_template_202011003","account_template_102010802","ICMS ST Partilha Incl."
"tax_group_icms_st_part_excl_goods","ICMS ST Partilha Excl.","base.br","account_template_202011003","account_template_102010802","ICMS ST Partilha Excl."
"tax_group_icms_st_sd_incl_goods","ICMS ST SD Incl.","base.br","account_template_202011003","account_template_102010802","ICMS ST SD Incl."
"tax_group_icms_st_sd_excl_goods","ICMS ST SD Excl.","base.br","account_template_202011003","account_template_102010802","ICMS ST SD Excl."
"tax_group_icms_st_sd_fcp_incl_goods","ICMS ST SD FCP Incl.","base.br","account_template_202011003","account_template_102010802","ICMS ST SD FCP Incl."
"tax_group_icms_st_sd_fcp_excl_goods","ICMS ST SD FCP Excl.","base.br","account_template_202011003","account_template_102010802","ICMS ST SD FCP Excl."
"tax_group_ii_incl_goods","II - Imposto de Importação Incl.","base.br","account_template_202011003","account_template_102010802","II - Imposto de Importação Incl."
"tax_group_ii_excl_goods","II - Imposto de Importação Excl.","base.br","account_template_202011003","account_template_102010802","II - Imposto de Importação Excl."
"tax_group_iof_incl_goods","IOF - Imposto sobre Operações Financeiras Incl.","base.br","account_template_202011003","account_template_102010802","IOF - Imposto sobre Operações Financeiras Incl."
"tax_group_iof_excl_goods","IOF - Imposto sobre Operações Financeiras Excl.","base.br","account_template_202011003","account_template_102010802","IOF - Imposto sobre Operações Financeiras Excl."
"tax_group_ipi_incl_goods","IPI Incl.","base.br","account_template_202011003","account_template_102010802","IPI Incl."
"tax_group_ipi_excl_goods","IPI Excl.","base.br","account_template_202011003","account_template_102010802","IPI Excl."
"tax_group_ipi_returned_incl_goods","IPI Retornado Incl.","base.br","account_template_202011003","account_template_102010802","IPI Retornado Incl."
"tax_group_ipi_returned_excl_goods","IPI Retornado Excl.","base.br","account_template_202011003","account_template_102010802","IPI Retornado Excl."
"tax_group_pis_incl_goods","PIS Incl.","base.br","account_template_202011003","account_template_102010802","PIS Incl."
"tax_group_pis_excl_goods","PIS Excl.","base.br","account_template_202011003","account_template_102010802","PIS Excl."
"tax_group_pis_deson_incl_goods","PIS Desoneração Incl.","base.br","account_template_202011003","account_template_102010802","PIS Desoneração Incl."
"tax_group_pis_deson_excl_goods","PIS Desoneração Excl.","base.br","account_template_202011003","account_template_102010802","PIS Desoneração Excl."
"tax_group_pis_st_incl_goods","PIS ST Incl.","base.br","account_template_202011003","account_template_102010802","PIS ST Incl."
"tax_group_pis_st_excl_goods","PIS ST Excl.","base.br","account_template_202011003","account_template_102010802","PIS ST Excl."
"tax_group_aproxtrib_city_incl_services","Approximate Municipal Taxation Incl.","base.br","account_template_202011003","account_template_102010802","Tributação Municipal Aproximada Incl."
"tax_group_aproxtrib_city_excl_services","Approximate Municipal Taxation Incl.","base.br","account_template_202011003","account_template_102010802","Tributação Municipal Aproximada Excl."
"tax_group_pis_rf_incl_services","PIS RF Incl.","base.br","account_template_202011003","account_template_102010802","PIS RF Incl."
"tax_group_pis_rf_excl_services","PIS RF Excl.","base.br","account_template_202011003","account_template_102010802","PIS RF Excl."
"tax_group_cofins_rf_incl_services","COFINS RF Incl.","base.br","account_template_202011003","account_template_102010802","COFINS RF Incl."
"tax_group_cofins_rf_excl_services","COFINS RF Excl.","base.br","account_template_202011003","account_template_102010802","COFINS RF Excl."
"tax_group_csll_incl_services","CSLL Incl.","base.br","account_template_202011003","account_template_102010802","CSLL Incl."
"tax_group_csll_excl_services","CSLL Excl.","base.br","account_template_202011003","account_template_102010802","CSLL Excl."
"tax_group_csll_rf_incl_services","CSLL RF Incl.","base.br","account_template_202011003","account_template_102010802","CSLL RF Incl."
"tax_group_csll_rf_excl_services","CSLL RF Excl.","base.br","account_template_202011003","account_template_102010802","CSLL RF Excl."
"tax_group_iss_incl_services","ISS Incl.","base.br","account_template_202011003","account_template_102010802","ISS Incl."
"tax_group_iss_excl_services","ISS Excl.","base.br","account_template_202011003","account_template_102010802","ISS Excl."
"tax_group_iss_rf_incl_services","ISS RF Incl.","base.br","account_template_202011003","account_template_102010802","ISS RF Incl."
"tax_group_iss_rf_excl_services","ISS RF Excl.","base.br","account_template_202011003","account_template_102010802","ISS RF Excl."
"tax_group_ir_pj_incl_services","IR PJ Incl.","base.br","account_template_202011003","account_template_102010802","IR PJ Incl."
"tax_group_ir_pj_excl_services","IR PJ Excl.","base.br","account_template_202011003","account_template_102010802","IR PJ Excl."
"tax_group_ir_rf_incl_services","IR RF Incl.","base.br","account_template_202011003","account_template_102010802","IR RF Incl."
"tax_group_ir_rf_excl_services","IR RF Excl.","base.br","account_template_202011003","account_template_102010802","IR RF Excl."
"tax_group_cprb_incl_services","CPRB Incl.","base.br","account_template_202011003","account_template_102010802","CPRB Incl."
"tax_group_cprb_excl_services","CPRB Excl.","base.br","account_template_202011003","account_template_102010802","CPRB Excl."
"tax_group_cprb_rf_incl_services","CPRB RF Incl.","base.br","account_template_202011003","account_template_102010802","CPRB RF Incl."
"tax_group_cprb_rf_excl_services","CPRB RF Excl.","base.br","account_template_202011003","account_template_102010802","CPRB RF Excl."
"tax_group_inss_ar_incl_services","INSS AR Incl.","base.br","account_template_202011003","account_template_102010802","INSS AR Incl."
"tax_group_inss_ar_excl_services","INSS AR Excl.","base.br","account_template_202011003","account_template_102010802","INSS AR Excl."
"tax_group_inss_rf_incl_services","INSS RF Incl.","base.br","account_template_202011003","account_template_102010802","INSS RF Incl."
"tax_group_inss_rf_excl_services","INSS RF Excl.","base.br","account_template_202011003","account_template_102010802","INSS RF Excl."
"tax_group_is_incl","IS Incl.","base.br","account_template_202011012","account_template_102010808","IS Incl."
"tax_group_is_spec_incl","IS Specific Incl.","base.br","account_template_202011013","account_template_102010809","IS Espec. Incl."
"tax_group_cbs_incl","CBS Incl.","base.br","account_template_202011014","account_template_102010810","CBS Incl."
"tax_group_ibs_incl","IBS Incl.","base.br","account_template_202011015","account_template_102010811","IBS Incl."
"tax_group_ibs_uf_incl","IBS UF Incl.","base.br","account_template_202011016","account_template_102010812","IBS UF Incl."
"tax_group_ibs_mun_incl","IBS Mun Incl.","base.br","account_template_202011017","account_template_102010813","IBS Mun Incl."
"tax_group_cbs_pc_incl","CBS P. C. Incl.","base.br","account_template_202011018","account_template_102010814","CBS P. C. Incl."
"tax_group_ibs_pc_incl","IBS P. C. Incl.","base.br","account_template_202011019","account_template_102010815","IBS P. C. Incl."
"tax_group_cbs_pc_sc_incl","CBS P. C. S. C. Incl.","base.br","account_template_202011020","account_template_102010816","CBS P. C. S. C. Incl."
"tax_group_ibs_pc_sc_incl","IBS P. C. S. C. Incl.","base.br","account_template_202011021","account_template_102010817","IBS P. C. S. C. Incl."
"tax_group_cbs_r_incl","CBS R. Incl.","base.br","account_template_202011022","account_template_102010818","CBS R. Incl."
"tax_group_ibs_uf_r_incl","IBS UF R. Incl.","base.br","account_template_202011023","account_template_102010819","IBS UF R. Incl."
"tax_group_ibs_m_r_incl","IBS M. R. Incl.","base.br","account_template_202011024","account_template_102010820","IBS M. R. Incl."
"tax_group_cbs_deferred_incl","CBS Deferred Incl.","base.br","account_template_202011025","account_template_102010821","CBS Diferido Incl."
"tax_group_ibs_deferred_incl","IBS Deferred Incl.","base.br","account_template_202011026","account_template_102010822","IBS Diferido Incl."
"tax_group_ibs_uf_deferred_incl","IBS UF Deferred Incl.","base.br","account_template_202011027","account_template_102010823","IBS UF Diferido Incl."
"tax_group_ibs_mun_deferred_incl","IBS Mun Deferred Incl.","base.br","account_template_202011029","account_template_102010824","IBS Mun Diferido Incl."
"tax_group_cbs_sw_incl","CBS S. W. Incl.","base.br","account_template_202011030","account_template_102010825","CBS S. W. Incl."
"tax_group_cbs_pw_incl","CBS P. W. Incl.","base.br","account_template_202011031","account_template_102010826","CBS P. W. Incl."
"tax_group_ibs_sw_incl","IBS S. W. Incl.","base.br","account_template_202011032","account_template_102010827","IBS S. W. Incl."
"tax_group_ibs_pw_incl","IBS P. W. Incl.","base.br","account_template_202011033","account_template_102010828","IBS P. W. Incl."
"tax_group_cbs_returned_incl","CBS Returned Incl.","base.br","account_template_202011034","account_template_102010829","CBS Retornado Incl."
"tax_group_ibs_uf_returned_incl","IBS UF Returned Incl.","base.br","account_template_202011035","account_template_102010830","IBS UF Retornado Incl."
"tax_group_ibs_mun_returned_incl","IBS Mun Returned Incl.","base.br","account_template_202011036","account_template_102010831","IBS Mun Retornado Incl."
"tax_group_cbs_gov_comp_incl","CBS Gov. Comp. Incl.","base.br","account_template_202011037","account_template_102010832","CBS Comp. Gov. Incl."
"tax_group_ibs_uf_gov_comp_incl","IBS UF Gov. Comp. Incl.","base.br","account_template_202011038","account_template_102010833","IBS UF Comp. Gov. Incl."
"tax_group_ibs_mun_gov_comp_incl","IBS Mun. Gov. Comp. Incl.","base.br","account_template_202011092","account_template_102010834","IBS Mun. Comp. Gov. Incl."
"tax_group_ibs_zfm_pc_incl","IBS ZFM P. C. Incl.","base.br","account_template_202011093","account_template_102010835","IBS ZFM C. P. Incl."
"tax_group_cbs_tc_incl","CBS T. C. Incl.","base.br","account_template_202011094","account_template_102010836","CBS C. T. Incl."
"tax_group_ibs_tc_incl","IBS T. C. Incl.","base.br","account_template_202011095","account_template_102010837","IBS C. T. Incl."
"tax_group_is_excl","IS Excl.","base.br","account_template_202011012","account_template_102010808","IS Excl."
"tax_group_is_spec_excl","IS Specific Excl.","base.br","account_template_202011013","account_template_102010809","IS Espec. Excl."
"tax_group_cbs_excl","CBS Excl.","base.br","account_template_202011014","account_template_102010810","CBS Excl."
"tax_group_ibs_excl","IBS Excl.","base.br","account_template_202011015","account_template_102010811","IBS Excl."
"tax_group_ibs_uf_excl","IBS UF Excl.","base.br","account_template_202011016","account_template_102010812","IBS UF Excl."
"tax_group_ibs_mun_excl","IBS Mun Excl.","base.br","account_template_202011017","account_template_102010813","IBS Mun Excl."
"tax_group_cbs_pc_excl","CBS P. C. Excl.","base.br","account_template_202011018","account_template_102010814","CBS P. C. Excl."
"tax_group_ibs_pc_excl","IBS P. C. Excl.","base.br","account_template_202011019","account_template_102010815","IBS P. C. Excl."
"tax_group_cbs_pc_sc_excl","CBS P. C. S. C. Excl.","base.br","account_template_202011020","account_template_102010816","CBS P. C. S. C. Excl."
"tax_group_ibs_pc_sc_excl","IBS P. C. S. C. Excl.","base.br","account_template_202011021","account_template_102010817","IBS P. C. S. C. Excl."
"tax_group_cbs_r_excl","CBS R. Excl.","base.br","account_template_202011022","account_template_102010818","CBS R. Excl."
"tax_group_ibs_uf_r_excl","IBS UF R. Excl.","base.br","account_template_202011023","account_template_102010819","IBS UF R. Excl."
"tax_group_ibs_m_r_excl","IBS M. R. Excl.","base.br","account_template_202011024","account_template_102010820","IBS M. R. Excl."
"tax_group_cbs_deferred_excl","CBS Deferred Excl.","base.br","account_template_202011025","account_template_102010821","CBS Diferido Excl."
"tax_group_ibs_deferred_excl","IBS Deferred Excl.","base.br","account_template_202011026","account_template_102010822","IBS Diferido Excl."
"tax_group_ibs_uf_deferred_excl","IBS UF Deferred Excl.","base.br","account_template_202011027","account_template_102010823","IBS UF Diferido Excl."
"tax_group_ibs_mun_deferred_excl","IBS Mun Deffered Excl.","base.br","account_template_202011029","account_template_102010824","IBS Mun Diferido Excl."
"tax_group_cbs_sw_excl","CBS S. W. Excl.","base.br","account_template_202011030","account_template_102010825","CBS S. W. Excl."
"tax_group_cbs_pw_excl","CBS P. W. Excl.","base.br","account_template_202011031","account_template_102010826","CBS P. W. Excl."
"tax_group_ibs_sw_excl","IBS S. W. Excl.","base.br","account_template_202011032","account_template_102010827","IBS S. W. Excl."
"tax_group_ibs_pw_excl","IBS P. W. Excl.","base.br","account_template_202011033","account_template_102010828","IBS P. W. Excl."
"tax_group_cbs_returned_excl","CBS Returned Excl.","base.br","account_template_202011034","account_template_102010829","CBS Retornado Excl."
"tax_group_ibs_uf_returned_excl","IBS UF Returned Excl.","base.br","account_template_202011035","account_template_102010830","IBS UF Retornado Excl."
"tax_group_ibs_mun_returned_excl","IBS Mun Returned Excl.","base.br","account_template_202011036","account_template_102010831","IBS Mun Retornado Excl."
"tax_group_cbs_gov_comp_excl","CBS Gov. Comp. Excl.","base.br","account_template_202011037","account_template_102010832","CBS Gov. Comp. Excl."
"tax_group_ibs_uf_gov_comp_excl","IBS UF Gov. Comp. Excl.","base.br","account_template_202011038","account_template_102010833","IBS UF Gov. Comp. Excl."
"tax_group_ibs_mun_gov_comp_excl","IBS Mun. Gov. Comp. Excl.","base.br","account_template_202011092","account_template_102010834","IBS Mun. Gov. Comp. Excl."
"tax_group_ibs_zfm_pc_excl","IBS ZFM P. C. Excl.","base.br","account_template_202011093","account_template_102010835","IBS ZFM P. C. Excl."
"tax_group_cbs_tc_excl","CBS T. C. Excl.","base.br","account_template_202011094","account_template_102010836","CBS T. C. Excl."
"tax_group_ibs_tc_excl","IBS T. C. Excl.","base.br","account_template_202011095","account_template_102010837","IBS T. C. Excl."
1 id name country_id tax_payable_account_id tax_receivable_account_id name@pt
2 tax_group_icms_0 ICMS 0% base.br account_template_202011003 account_template_102010802 ICMS 0%
3 tax_group_icms_7 ICMS 7% base.br account_template_202011003 account_template_102010802 ICMS 7%
4 tax_group_icms_12 ICMS 12% base.br account_template_202011003 account_template_102010802 ICMS 12%
5 tax_group_icms_17 ICMS 17% base.br account_template_202011003 account_template_102010802 ICMS 17%
6 tax_group_irpj_0 IRPJ 0% base.br account_template_202011003 account_template_102010802 IRPJ 0%
7 tax_group_pis_0 PIS 0% base.br account_template_202011003 account_template_102010802 PIS 0%
8 tax_group_pis_065 PIS 0.65% base.br account_template_202011003 account_template_102010802 PIS 0.65%
9 tax_group_cofins_0 COFINS 0% base.br account_template_202011003 account_template_102010802 COFINS 0%
10 tax_group_cofins_3 COFINS 3% base.br account_template_202011003 account_template_102010802 COFINS 3%
11 tax_group_ir_0 IR 0% base.br account_template_202011003 account_template_102010802 IR 0%
12 tax_group_issqn_2 ISSQN 2% base.br account_template_202011003 account_template_102010802 ISSQN 2%
13 tax_group_csll_0 CSLL 0% base.br account_template_202011003 account_template_102010802 CSLL 0%
14 tax_group_ipi_0 IPI 0% base.br account_template_202011003 account_template_102010802 IPI 0%
15 tax_group_ipi_10 IPI 10% base.br account_template_202011003 account_template_102010802 IPI 10%
16 tax_group_ii_0 II base.br account_template_202011003 account_template_102010802 II
17 tax_group_inss_0 INSS base.br account_template_202011003 account_template_102010802 INSS
18 tax_group_aproxtrib_fed_incl_goods Tributação Federal Aproximada Incl. base.br account_template_202011003 account_template_102010802 Tributação Federal Aproximada Incl.
19 tax_group_aproxtrib_fed_excl_goods Tributação Federal Aproximada Excl. base.br account_template_202011003 account_template_102010802 Tributação Federal Aproximada Excl.
20 tax_group_aproxtrib_state_incl_goods Tributação Estadual Aproximada Incl. base.br account_template_202011003 account_template_102010802 Tributação Estadual Aproximada Incl.
21 tax_group_aproxtrib_state_excl_goods Tributação Estadual Aproximada Excl. base.br account_template_202011003 account_template_102010802 Tributação Estadual Aproximada Excl.
22 tax_group_cofins_incl_goods COFINS Incl. base.br account_template_202011003 account_template_102010802 COFINS Incl.
23 tax_group_cofins_excl_goods COFINS Excl. base.br account_template_202011003 account_template_102010802 COFINS Excl.
24 tax_group_cofins_deson_incl_goods COFINS Desoneração Incl. base.br account_template_202011003 account_template_102010802 COFINS Desoneração Incl.
25 tax_group_cofins_deson_excl_goods COFINS Desoneração Excl. base.br account_template_202011003 account_template_102010802 COFINS Desoneração Excl.
26 tax_group_cofins_st_incl_goods COFINS ST Incl. base.br account_template_202011003 account_template_102010802 COFINS ST Incl.
27 tax_group_cofins_st_excl_goods COFINS ST Excl. base.br account_template_202011003 account_template_102010802 COFINS ST Excl.
28 tax_group_icms_incl_goods ICMS Incl. base.br account_template_202011003 account_template_102010802 ICMS Incl.
29 tax_group_icms_excl_goods ICMS Excl. base.br account_template_202011003 account_template_102010802 ICMS Excl.
30 tax_group_icms_credsn_incl_goods ICMS CredSN Incl. base.br account_template_202011003 account_template_102010802 ICMS CredSN Incl.
31 tax_group_icms_credsn_excl_goods ICMS CredSN Excl. base.br account_template_202011003 account_template_102010802 ICMS CredSN Excl.
32 tax_group_icms_deson_incl_goods ICMS Desoneração Incl. base.br account_template_202011003 account_template_102010802 ICMS Desoneração Incl.
33 tax_group_icms_deson_excl_goods ICMS Desoneração Excl. base.br account_template_202011003 account_template_102010802 ICMS Desoneração Excl.
34 tax_group_icms_difa_dest_incl_goods ICMS DIFA Destinatário Incl. base.br account_template_202011003 account_template_102010802 ICMS DIFA Destinatário Incl.
35 tax_group_icms_difa_dest_excl_goods ICMS DIFA Destinatário Excl. base.br account_template_202011003 account_template_102010802 ICMS DIFA Destinatário Excl.
36 tax_group_icms_difa_fcp_incl_goods ICMS DIFA FCP Incl. base.br account_template_202011003 account_template_102010802 ICMS DIFA FCP Incl.
37 tax_group_icms_difa_fcp_excl_goods ICMS DIFA FCP Excl. base.br account_template_202011003 account_template_102010802 ICMS DIFA FCP Excl.
38 tax_group_icms_difa_remet_incl_goods ICMS DIFA Remetente Incl. base.br account_template_202011003 account_template_102010802 ICMS DIFA Remetente Incl.
39 tax_group_icms_difa_remet_excl_goods ICMS DIFA Remetente Excl. base.br account_template_202011003 account_template_102010802 ICMS DIFA Remetente Excl.
40 tax_group_icms_eff_incl_goods ICMS EFF Incl. base.br account_template_202011003 account_template_102010802 ICMS EFF Incl.
41 tax_group_icms_eff_excl_goods ICMS EFF Excl. base.br account_template_202011003 account_template_102010802 ICMS EFF Excl.
42 tax_group_icms_fcp_incl_goods ICMS FCP Incl. base.br account_template_202011003 account_template_102010802 ICMS FCP Incl.
43 tax_group_icms_fcp_excl_goods ICMS FCP Excl. base.br account_template_202011003 account_template_102010802 ICMS FCP Excl.
44 tax_group_icms_own_payer_incl_goods ICMS Próprio Emitente Incl. base.br account_template_202011003 account_template_102010802 ICMS Próprio Emitente Incl.
45 tax_group_icms_own_payer_excl_goods ICMS Próprio Emitente Excl. base.br account_template_202011003 account_template_102010802 ICMS Próprio Emitente Excl.
46 tax_group_icms_part_incl_goods ICMS Partilha Incl. base.br account_template_202011003 account_template_102010802 ICMS Partilha Incl.
47 tax_group_icms_part_excl_goods ICMS Partilha Excl. base.br account_template_202011003 account_template_102010802 ICMS Partilha Excl.
48 tax_group_icms_rf_incl_goods ICMS RF Incl. base.br account_template_202011003 account_template_102010802 ICMS RF Incl.
49 tax_group_icms_rf_excl_goods ICMS RF Excl. base.br account_template_202011003 account_template_102010802 ICMS RF Excl.
50 tax_group_icms_st_incl_goods ICMS ST Incl. base.br account_template_202011003 account_template_102010802 ICMS ST Incl.
51 tax_group_icms_st_excl_goods ICMS ST Excl. base.br account_template_202011003 account_template_102010802 ICMS ST Excl.
52 tax_group_icms_st_fcp_incl_goods ICMS ST FCP Incl. base.br account_template_202011003 account_template_102010802 ICMS ST FCP Incl.
53 tax_group_icms_st_fcp_excl_goods ICMS ST FCP Excl. base.br account_template_202011003 account_template_102010802 ICMS ST FCP Excl.
54 tax_group_icms_st_fcppart_incl_goods ICMS ST FCP Partilha Incl. base.br account_template_202011003 account_template_102010802 ICMS ST FCP Partilha Incl.
55 tax_group_icms_st_fcppart_excl_goods ICMS ST FCP Partilha Excl. base.br account_template_202011003 account_template_102010802 ICMS ST FCP Partilha Excl.
56 tax_group_icms_st_part_incl_goods ICMS ST Partilha Incl. base.br account_template_202011003 account_template_102010802 ICMS ST Partilha Incl.
57 tax_group_icms_st_part_excl_goods ICMS ST Partilha Excl. base.br account_template_202011003 account_template_102010802 ICMS ST Partilha Excl.
58 tax_group_icms_st_sd_incl_goods ICMS ST SD Incl. base.br account_template_202011003 account_template_102010802 ICMS ST SD Incl.
59 tax_group_icms_st_sd_excl_goods ICMS ST SD Excl. base.br account_template_202011003 account_template_102010802 ICMS ST SD Excl.
60 tax_group_icms_st_sd_fcp_incl_goods ICMS ST SD FCP Incl. base.br account_template_202011003 account_template_102010802 ICMS ST SD FCP Incl.
61 tax_group_icms_st_sd_fcp_excl_goods ICMS ST SD FCP Excl. base.br account_template_202011003 account_template_102010802 ICMS ST SD FCP Excl.
62 tax_group_ii_incl_goods II - Imposto de Importação Incl. base.br account_template_202011003 account_template_102010802 II - Imposto de Importação Incl.
63 tax_group_ii_excl_goods II - Imposto de Importação Excl. base.br account_template_202011003 account_template_102010802 II - Imposto de Importação Excl.
64 tax_group_iof_incl_goods IOF - Imposto sobre Operações Financeiras Incl. base.br account_template_202011003 account_template_102010802 IOF - Imposto sobre Operações Financeiras Incl.
65 tax_group_iof_excl_goods IOF - Imposto sobre Operações Financeiras Excl. base.br account_template_202011003 account_template_102010802 IOF - Imposto sobre Operações Financeiras Excl.
66 tax_group_ipi_incl_goods IPI Incl. base.br account_template_202011003 account_template_102010802 IPI Incl.
67 tax_group_ipi_excl_goods IPI Excl. base.br account_template_202011003 account_template_102010802 IPI Excl.
68 tax_group_ipi_returned_incl_goods IPI Retornado Incl. base.br account_template_202011003 account_template_102010802 IPI Retornado Incl.
69 tax_group_ipi_returned_excl_goods IPI Retornado Excl. base.br account_template_202011003 account_template_102010802 IPI Retornado Excl.
70 tax_group_pis_incl_goods PIS Incl. base.br account_template_202011003 account_template_102010802 PIS Incl.
71 tax_group_pis_excl_goods PIS Excl. base.br account_template_202011003 account_template_102010802 PIS Excl.
72 tax_group_pis_deson_incl_goods PIS Desoneração Incl. base.br account_template_202011003 account_template_102010802 PIS Desoneração Incl.
73 tax_group_pis_deson_excl_goods PIS Desoneração Excl. base.br account_template_202011003 account_template_102010802 PIS Desoneração Excl.
74 tax_group_pis_st_incl_goods PIS ST Incl. base.br account_template_202011003 account_template_102010802 PIS ST Incl.
75 tax_group_pis_st_excl_goods PIS ST Excl. base.br account_template_202011003 account_template_102010802 PIS ST Excl.
76 tax_group_aproxtrib_city_incl_services Approximate Municipal Taxation Incl. base.br account_template_202011003 account_template_102010802 Tributação Municipal Aproximada Incl.
77 tax_group_aproxtrib_city_excl_services Approximate Municipal Taxation Incl. base.br account_template_202011003 account_template_102010802 Tributação Municipal Aproximada Excl.
78 tax_group_pis_rf_incl_services PIS RF Incl. base.br account_template_202011003 account_template_102010802 PIS RF Incl.
79 tax_group_pis_rf_excl_services PIS RF Excl. base.br account_template_202011003 account_template_102010802 PIS RF Excl.
80 tax_group_cofins_rf_incl_services COFINS RF Incl. base.br account_template_202011003 account_template_102010802 COFINS RF Incl.
81 tax_group_cofins_rf_excl_services COFINS RF Excl. base.br account_template_202011003 account_template_102010802 COFINS RF Excl.
82 tax_group_csll_incl_services CSLL Incl. base.br account_template_202011003 account_template_102010802 CSLL Incl.
83 tax_group_csll_excl_services CSLL Excl. base.br account_template_202011003 account_template_102010802 CSLL Excl.
84 tax_group_csll_rf_incl_services CSLL RF Incl. base.br account_template_202011003 account_template_102010802 CSLL RF Incl.
85 tax_group_csll_rf_excl_services CSLL RF Excl. base.br account_template_202011003 account_template_102010802 CSLL RF Excl.
86 tax_group_iss_incl_services ISS Incl. base.br account_template_202011003 account_template_102010802 ISS Incl.
87 tax_group_iss_excl_services ISS Excl. base.br account_template_202011003 account_template_102010802 ISS Excl.
88 tax_group_iss_rf_incl_services ISS RF Incl. base.br account_template_202011003 account_template_102010802 ISS RF Incl.
89 tax_group_iss_rf_excl_services ISS RF Excl. base.br account_template_202011003 account_template_102010802 ISS RF Excl.
90 tax_group_ir_pj_incl_services IR PJ Incl. base.br account_template_202011003 account_template_102010802 IR PJ Incl.
91 tax_group_ir_pj_excl_services IR PJ Excl. base.br account_template_202011003 account_template_102010802 IR PJ Excl.
92 tax_group_ir_rf_incl_services IR RF Incl. base.br account_template_202011003 account_template_102010802 IR RF Incl.
93 tax_group_ir_rf_excl_services IR RF Excl. base.br account_template_202011003 account_template_102010802 IR RF Excl.
94 tax_group_cprb_incl_services CPRB Incl. base.br account_template_202011003 account_template_102010802 CPRB Incl.
95 tax_group_cprb_excl_services CPRB Excl. base.br account_template_202011003 account_template_102010802 CPRB Excl.
96 tax_group_cprb_rf_incl_services CPRB RF Incl. base.br account_template_202011003 account_template_102010802 CPRB RF Incl.
97 tax_group_cprb_rf_excl_services CPRB RF Excl. base.br account_template_202011003 account_template_102010802 CPRB RF Excl.
98 tax_group_inss_ar_incl_services INSS AR Incl. base.br account_template_202011003 account_template_102010802 INSS AR Incl.
99 tax_group_inss_ar_excl_services INSS AR Excl. base.br account_template_202011003 account_template_102010802 INSS AR Excl.
100 tax_group_inss_rf_incl_services INSS RF Incl. base.br account_template_202011003 account_template_102010802 INSS RF Incl.
101 tax_group_inss_rf_excl_services INSS RF Excl. base.br account_template_202011003 account_template_102010802 INSS RF Excl.
102 tax_group_is_incl IS Incl. base.br account_template_202011012 account_template_102010808 IS Incl.
103 tax_group_is_spec_incl IS Specific Incl. base.br account_template_202011013 account_template_102010809 IS Espec. Incl.
104 tax_group_cbs_incl CBS Incl. base.br account_template_202011014 account_template_102010810 CBS Incl.
105 tax_group_ibs_incl IBS Incl. base.br account_template_202011015 account_template_102010811 IBS Incl.
106 tax_group_ibs_uf_incl IBS UF Incl. base.br account_template_202011016 account_template_102010812 IBS UF Incl.
107 tax_group_ibs_mun_incl IBS Mun Incl. base.br account_template_202011017 account_template_102010813 IBS Mun Incl.
108 tax_group_cbs_pc_incl CBS P. C. Incl. base.br account_template_202011018 account_template_102010814 CBS P. C. Incl.
109 tax_group_ibs_pc_incl IBS P. C. Incl. base.br account_template_202011019 account_template_102010815 IBS P. C. Incl.
110 tax_group_cbs_pc_sc_incl CBS P. C. S. C. Incl. base.br account_template_202011020 account_template_102010816 CBS P. C. S. C. Incl.
111 tax_group_ibs_pc_sc_incl IBS P. C. S. C. Incl. base.br account_template_202011021 account_template_102010817 IBS P. C. S. C. Incl.
112 tax_group_cbs_r_incl CBS R. Incl. base.br account_template_202011022 account_template_102010818 CBS R. Incl.
113 tax_group_ibs_uf_r_incl IBS UF R. Incl. base.br account_template_202011023 account_template_102010819 IBS UF R. Incl.
114 tax_group_ibs_m_r_incl IBS M. R. Incl. base.br account_template_202011024 account_template_102010820 IBS M. R. Incl.
115 tax_group_cbs_deferred_incl CBS Deferred Incl. base.br account_template_202011025 account_template_102010821 CBS Diferido Incl.
116 tax_group_ibs_deferred_incl IBS Deferred Incl. base.br account_template_202011026 account_template_102010822 IBS Diferido Incl.
117 tax_group_ibs_uf_deferred_incl IBS UF Deferred Incl. base.br account_template_202011027 account_template_102010823 IBS UF Diferido Incl.
118 tax_group_ibs_mun_deferred_incl IBS Mun Deferred Incl. base.br account_template_202011029 account_template_102010824 IBS Mun Diferido Incl.
119 tax_group_cbs_sw_incl CBS S. W. Incl. base.br account_template_202011030 account_template_102010825 CBS S. W. Incl.
120 tax_group_cbs_pw_incl CBS P. W. Incl. base.br account_template_202011031 account_template_102010826 CBS P. W. Incl.
121 tax_group_ibs_sw_incl IBS S. W. Incl. base.br account_template_202011032 account_template_102010827 IBS S. W. Incl.
122 tax_group_ibs_pw_incl IBS P. W. Incl. base.br account_template_202011033 account_template_102010828 IBS P. W. Incl.
123 tax_group_cbs_returned_incl CBS Returned Incl. base.br account_template_202011034 account_template_102010829 CBS Retornado Incl.
124 tax_group_ibs_uf_returned_incl IBS UF Returned Incl. base.br account_template_202011035 account_template_102010830 IBS UF Retornado Incl.
125 tax_group_ibs_mun_returned_incl IBS Mun Returned Incl. base.br account_template_202011036 account_template_102010831 IBS Mun Retornado Incl.
126 tax_group_cbs_gov_comp_incl CBS Gov. Comp. Incl. base.br account_template_202011037 account_template_102010832 CBS Comp. Gov. Incl.
127 tax_group_ibs_uf_gov_comp_incl IBS UF Gov. Comp. Incl. base.br account_template_202011038 account_template_102010833 IBS UF Comp. Gov. Incl.
128 tax_group_ibs_mun_gov_comp_incl IBS Mun. Gov. Comp. Incl. base.br account_template_202011092 account_template_102010834 IBS Mun. Comp. Gov. Incl.
129 tax_group_ibs_zfm_pc_incl IBS ZFM P. C. Incl. base.br account_template_202011093 account_template_102010835 IBS ZFM C. P. Incl.
130 tax_group_cbs_tc_incl CBS T. C. Incl. base.br account_template_202011094 account_template_102010836 CBS C. T. Incl.
131 tax_group_ibs_tc_incl IBS T. C. Incl. base.br account_template_202011095 account_template_102010837 IBS C. T. Incl.
132 tax_group_is_excl IS Excl. base.br account_template_202011012 account_template_102010808 IS Excl.
133 tax_group_is_spec_excl IS Specific Excl. base.br account_template_202011013 account_template_102010809 IS Espec. Excl.
134 tax_group_cbs_excl CBS Excl. base.br account_template_202011014 account_template_102010810 CBS Excl.
135 tax_group_ibs_excl IBS Excl. base.br account_template_202011015 account_template_102010811 IBS Excl.
136 tax_group_ibs_uf_excl IBS UF Excl. base.br account_template_202011016 account_template_102010812 IBS UF Excl.
137 tax_group_ibs_mun_excl IBS Mun Excl. base.br account_template_202011017 account_template_102010813 IBS Mun Excl.
138 tax_group_cbs_pc_excl CBS P. C. Excl. base.br account_template_202011018 account_template_102010814 CBS P. C. Excl.
139 tax_group_ibs_pc_excl IBS P. C. Excl. base.br account_template_202011019 account_template_102010815 IBS P. C. Excl.
140 tax_group_cbs_pc_sc_excl CBS P. C. S. C. Excl. base.br account_template_202011020 account_template_102010816 CBS P. C. S. C. Excl.
141 tax_group_ibs_pc_sc_excl IBS P. C. S. C. Excl. base.br account_template_202011021 account_template_102010817 IBS P. C. S. C. Excl.
142 tax_group_cbs_r_excl CBS R. Excl. base.br account_template_202011022 account_template_102010818 CBS R. Excl.
143 tax_group_ibs_uf_r_excl IBS UF R. Excl. base.br account_template_202011023 account_template_102010819 IBS UF R. Excl.
144 tax_group_ibs_m_r_excl IBS M. R. Excl. base.br account_template_202011024 account_template_102010820 IBS M. R. Excl.
145 tax_group_cbs_deferred_excl CBS Deferred Excl. base.br account_template_202011025 account_template_102010821 CBS Diferido Excl.
146 tax_group_ibs_deferred_excl IBS Deferred Excl. base.br account_template_202011026 account_template_102010822 IBS Diferido Excl.
147 tax_group_ibs_uf_deferred_excl IBS UF Deferred Excl. base.br account_template_202011027 account_template_102010823 IBS UF Diferido Excl.
148 tax_group_ibs_mun_deferred_excl IBS Mun Deffered Excl. base.br account_template_202011029 account_template_102010824 IBS Mun Diferido Excl.
149 tax_group_cbs_sw_excl CBS S. W. Excl. base.br account_template_202011030 account_template_102010825 CBS S. W. Excl.
150 tax_group_cbs_pw_excl CBS P. W. Excl. base.br account_template_202011031 account_template_102010826 CBS P. W. Excl.
151 tax_group_ibs_sw_excl IBS S. W. Excl. base.br account_template_202011032 account_template_102010827 IBS S. W. Excl.
152 tax_group_ibs_pw_excl IBS P. W. Excl. base.br account_template_202011033 account_template_102010828 IBS P. W. Excl.
153 tax_group_cbs_returned_excl CBS Returned Excl. base.br account_template_202011034 account_template_102010829 CBS Retornado Excl.
154 tax_group_ibs_uf_returned_excl IBS UF Returned Excl. base.br account_template_202011035 account_template_102010830 IBS UF Retornado Excl.
155 tax_group_ibs_mun_returned_excl IBS Mun Returned Excl. base.br account_template_202011036 account_template_102010831 IBS Mun Retornado Excl.
156 tax_group_cbs_gov_comp_excl CBS Gov. Comp. Excl. base.br account_template_202011037 account_template_102010832 CBS Gov. Comp. Excl.
157 tax_group_ibs_uf_gov_comp_excl IBS UF Gov. Comp. Excl. base.br account_template_202011038 account_template_102010833 IBS UF Gov. Comp. Excl.
158 tax_group_ibs_mun_gov_comp_excl IBS Mun. Gov. Comp. Excl. base.br account_template_202011092 account_template_102010834 IBS Mun. Gov. Comp. Excl.
159 tax_group_ibs_zfm_pc_excl IBS ZFM P. C. Excl. base.br account_template_202011093 account_template_102010835 IBS ZFM P. C. Excl.
160 tax_group_cbs_tc_excl CBS T. C. Excl. base.br account_template_202011094 account_template_102010836 CBS T. C. Excl.
161 tax_group_ibs_tc_excl IBS T. C. Excl. base.br account_template_202011095 account_template_102010837 IBS T. C. Excl.

View file

@ -0,0 +1 @@
from . import account_demo

View file

@ -0,0 +1,20 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
@api.model
def _get_demo_data_move(self, company=False):
""" Set the l10n_latam_document_number on demo invoices """
move_data = super()._get_demo_data_move(company)
if company.account_fiscal_country_id.code == 'BR':
number = 0
for move in move_data.values():
# vendor bills and refund must be manually numbered (l10n_br uses the standard AccountMove._is_manual_document_number())
if move['move_type'] in ('in_invoice', 'in_refund'):
move['l10n_latam_document_number'] = f'{number:08d}'
number += 1
return move_data

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="partner_demo_company_br" model="res.partner">
<record id="base.partner_demo_company_br" model="res.partner" forcecreate="1">
<field name="name">BR Company</field>
<field name="vat">51494569013170</field>
<field name="street">Praça Mauá 1</field>
@ -11,24 +11,27 @@
<field name="phone">+55 11 96123-4567</field>
<field name="email">info@company.brexample.com</field>
<field name="website">www.brexample.com</field>
<field name="is_company" eval="True"/>
</record>
<record id="demo_company_br" model="res.company">
<record id="base.demo_company_br" model="res.company" forcecreate="1">
<field name="name">BR Company</field>
<field name="partner_id" ref="partner_demo_company_br"/>
<field name="partner_id" ref="base.partner_demo_company_br"/>
</record>
<function model="res.company" name="_onchange_country_id">
<value eval="[ref('demo_company_br')]"/>
<value eval="[ref('base.demo_company_br')]"/>
</function>
<function model="res.users" name="write">
<value eval="[ref('base.user_root'), ref('base.user_admin'), ref('base.user_demo')]"/>
<value eval="{'company_ids': [(4, ref('l10n_br.demo_company_br'))]}"/>
<value eval="{'company_ids': [(4, ref('base.demo_company_br'))]}"/>
</function>
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_br.l10n_br_account_chart_template')]"/>
<value model="res.company" eval="obj().env.ref('l10n_br.demo_company_br')"/>
<value eval="[]"/>
<value>br</value>
<value model="res.company" eval="obj().env.ref('base.demo_company_br')"/>
<value name="install_demo" eval="True"/>
</function>
</odoo>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import SUPERUSER_ID, api
def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
for company in env['res.company'].search([('chart_template', '=', 'br')], order="parent_path"):
env['account.chart.template'].try_loading('br', company)

View file

@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 Renato Lima - Akretion
from . import template_br
from . import account
from . import account_fiscal_position_template
from . import account_journal
from . import account_move
from . import account_fiscal_position
from . import account_chart_template
from . import res_company
from . import l10n_br_zip_range
from . import res_partner
from . import res_city
from . import res_company
from . import res_partner_bank

View file

@ -4,23 +4,11 @@
from odoo import fields, models
class AccountTaxTemplate(models.Model):
""" Add fields used to define some brazilian taxes """
_inherit = 'account.tax.template'
tax_discount = fields.Boolean(string='Discount this Tax in Prince',
help="Mark it for (ICMS, PIS e etc.).")
base_reduction = fields.Float(string='Redution', digits=0, required=True,
help="Um percentual decimal em % entre 0-1.", default=0)
amount_mva = fields.Float(string='MVA Percent', digits=0, required=True,
help="Um percentual decimal em % entre 0-1.", default=0)
class AccountTax(models.Model):
""" Add fields used to define some brazilian taxes """
_inherit = 'account.tax'
tax_discount = fields.Boolean(string='Discount this Tax in Prince',
tax_discount = fields.Boolean(string='Discount this Tax in Price',
help="Mark it for (ICMS, PIS e etc.).")
base_reduction = fields.Float(string='Redution', digits=0, required=True,
help="Um percentual decimal em % entre 0-1.", default=0)

View file

@ -1,13 +0,0 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _get_fp_vals(self, company, position):
res = super()._get_fp_vals(company, position)
if company.country_id.code == 'BR':
res['l10n_br_fp_type'] = position['l10n_br_fp_type']
return res

View file

@ -26,17 +26,19 @@ class AccountFiscalPosition(models.Model):
if not delivery:
delivery = partner
if self.env.company.country_id.code != "BR" or delivery.country_id.code != 'BR':
company = self.env.company
if company.country_id.code != "BR" or delivery.country_id.code != 'BR':
return super()._get_fiscal_position(partner, delivery=delivery)
# manually set fiscal position on partner has a higher priority
manual_fiscal_position = delivery.property_account_position_id or partner.property_account_position_id
manual_fiscal_position = delivery.with_company(company).property_account_position_id or partner.with_company(company).property_account_position_id
if manual_fiscal_position:
return manual_fiscal_position
# Taxation in Brazil depends on both the state of the partner and the state of the company
if self.env.company.state_id == delivery.state_id:
return self.search([('l10n_br_fp_type', '=', 'internal'), ('company_id', '=', self.env.company.id)], limit=1)
if self.env.company.state_id.code in SOUTH_SOUTHEAST and delivery.state_id.code in NORTH_NORTHEAST_MIDWEST:
return self.search([('l10n_br_fp_type', '=', 'ss_nnm'), ('company_id', '=', self.env.company.id)], limit=1)
return self.search([('l10n_br_fp_type', '=', 'interstate'), ('company_id', '=', self.env.company.id)], limit=1)
if company.state_id == delivery.state_id:
return self.search([('l10n_br_fp_type', '=', 'internal'), ('company_id', '=', company.id)], limit=1)
if company.state_id.code in SOUTH_SOUTHEAST and delivery.state_id.code in NORTH_NORTHEAST_MIDWEST:
return self.search([('l10n_br_fp_type', '=', 'ss_nnm'), ('company_id', '=', company.id)], limit=1)
return self.search([('l10n_br_fp_type', '=', 'interstate'), ('company_id', '=', company.id)], limit=1)

View file

@ -1,16 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class AccountFiscalPositionTemplate(models.Model):
_inherit = 'account.fiscal.position.template'
l10n_br_fp_type = fields.Selection(
selection=[
('internal', 'Internal'),
('ss_nnm', 'South/Southeast selling to North/Northeast/Midwest'),
('interstate', 'Other interstate'),
],
string='Interstate Fiscal Position Type',
)

View file

@ -0,0 +1,19 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api
class AccountJournal(models.Model):
_inherit = 'account.journal'
l10n_br_invoice_serial = fields.Char(
'Series', copy=False,
help='Brazil: Series number associated with this Journal. If more than one Series needs to be used, duplicate this Journal and assign the new Series to the duplicated Journal.'
)
@api.depends('l10n_br_invoice_serial')
def _compute_display_name(self):
res = super()._compute_display_name()
for journal in self.filtered('l10n_br_invoice_serial'):
journal.display_name = f'{journal.l10n_br_invoice_serial}-{journal.display_name}'
return res

View file

@ -0,0 +1,24 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _compute_l10n_latam_document_type(self):
""" Override for debit notes. This sets the same document type as the one on the origin. Cannot
override the defaults in the account.move.debit wizard because l10n_latam_invoice_document explicitly
calls _compute_l10n_latam_document_type() after the debit note is created. """
br_debit_notes = self.filtered(lambda m: m.state == "draft" and m.country_code == "BR" and m.debit_origin_id.l10n_latam_document_type_id)
for move in br_debit_notes:
move.l10n_latam_document_type_id = move.debit_origin_id.l10n_latam_document_type_id
return super(AccountMove, self - br_debit_notes)._compute_l10n_latam_document_type()
def _get_last_sequence_domain(self, relaxed=False):
""" Override to give sequence names in the same journal their own, independent numbering. """
where_string, param = super()._get_last_sequence_domain(relaxed)
if self.country_code == "BR" and self.l10n_latam_use_documents:
where_string += " AND l10n_latam_document_type_id = %(l10n_latam_document_type_id)s "
param["l10n_latam_document_type_id"] = self.l10n_latam_document_type_id.id or 0
return where_string, param

View file

@ -0,0 +1,41 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
class L10n_BrZipRange(models.Model):
_name = 'l10n_br.zip.range'
_description = "Brazilian city zip range"
city_id = fields.Many2one("res.city", string="City", required=True)
start = fields.Char(string="From", required=True)
end = fields.Char(string="To", required=True)
_uniq_start = models.Constraint(
'unique(start)',
'The "from" zip must be unique',
)
_uniq_end = models.Constraint(
'unique("end")',
'The "to" zip must be unique.',
)
@api.constrains("start", "end")
def _check_range(self):
zip_format = re.compile(r"\d{5}-\d{3}")
for zip_range in self:
if not zip_format.fullmatch(zip_range.start) or not zip_format.fullmatch(zip_range.end):
raise ValidationError(
_(
"Invalid zip range format: %(start)s %(end)s. It should follow this format: 01000-001",
start=zip_range.start,
end=zip_range.end,
)
)
if zip_range.start >= zip_range.end:
raise ValidationError(
_("Start should be less than end: %(start)s %(end)s", start=zip_range.start, end=zip_range.end)
)

View file

@ -0,0 +1,26 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api
class ResCity(models.Model):
_inherit = "res.city"
l10n_br_zip_range_ids = fields.One2many(
string="Zip Ranges",
comodel_name="l10n_br.zip.range",
inverse_name="city_id",
help="Brazil: technical field that maps a city to one or more zip code ranges.",
)
l10n_br_zip_ranges = fields.Char(
string="Frontend Zip Ranges",
compute="_compute_l10n_br_zip_ranges",
help="Brazil: technical field that maps a city to one or more zip code ranges for the frontend.",
)
@api.depends("l10n_br_zip_range_ids")
def _compute_l10n_br_zip_ranges(self):
for city in self:
city.l10n_br_zip_ranges = " ".join(
city.l10n_br_zip_range_ids.mapped(lambda zip_range: f"[{zip_range.start} {zip_range.end}]")
)

View file

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
@ -8,7 +7,13 @@ class ResCompany(models.Model):
_inherit = "res.company"
# ==== Business fields ====
l10n_br_cpf_code = fields.Char(string="CPF", help="Natural Persons Register.")
l10n_br_ie_code = fields.Char(string="IE", help="State Tax Identification Number. Should contain 9-14 digits.") # each state has its own format. Not all of the validation rules can be easily found.
l10n_br_im_code = fields.Char(string="IM", help="Municipal Tax Identification Number") # each municipality has its own format. There is no information about validation anywhere.
l10n_br_ie_code = fields.Char(string="IE", related="partner_id.l10n_br_ie_code", readonly=False) # each state has its own format. Not all of the validation rules can be easily found.
l10n_br_im_code = fields.Char(string="IM", related="partner_id.l10n_br_im_code", readonly=False) # each municipality has its own format. There is no information about validation anywhere.
l10n_br_nire_code = fields.Char(string="NIRE", help="State Commercial Identification Number. Should contain 11 digits.")
def _localization_use_documents(self):
self.ensure_one()
return self.chart_template == 'br' or self.account_fiscal_country_id.code == "BR" or super()._localization_use_documents()
def _is_latam(self):
return super()._is_latam() or self.account_fiscal_country_id.code == 'BR'

View file

@ -1,15 +1,17 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
import re
from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
l10n_br_cpf_code = fields.Char(string="CPF", help="Natural Persons Register.")
l10n_br_ie_code = fields.Char(string="IE", help="State Tax Identification Number. Should contain 9-14 digits.")
l10n_br_im_code = fields.Char(string="IM", help="Municipal Tax Identification Number")
l10n_br_isuf_code = fields.Char(string="SUFRAMA code", help="SUFRAMA registration number.")
def _get_frontend_writable_fields(self):
frontend_writable_fields = super()._get_frontend_writable_fields()
frontend_writable_fields.update({'city_id', 'street_number', 'street_name', 'street_number2'})
return frontend_writable_fields

View file

@ -0,0 +1,133 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
from odoo import models, fields, api, _
from odoo.addons.mail.tools.mail_validation import mail_validate
from odoo.exceptions import ValidationError
from odoo.tools import float_repr
class ResPartnerBank(models.Model):
_inherit = "res.partner.bank"
proxy_type = fields.Selection(
selection_add=[
("email", "Email Address"),
("mobile", "Mobile Number"),
("br_cpf_cnpj", "CPF/CNPJ (BR)"),
("br_random", "Random Key (BR)"),
],
ondelete={
"email": "set default",
"mobile": "set default",
"br_cpf_cnpj": "set default",
"br_random": "set default",
},
)
@api.constrains("proxy_type", "proxy_value", "partner_id")
def _check_br_proxy(self):
for bank in self.filtered(lambda bank: bank.country_code == "BR" and bank.proxy_type != "none"):
if bank.proxy_type not in ("email", "mobile", "br_cpf_cnpj", "br_random"):
raise ValidationError(
_(
"The proxy type must be Email Address, Mobile Number, CPF/CNPJ (BR) or Random Key (BR) for Pix code generation."
)
)
value = bank.proxy_value
if bank.proxy_type == "email" and not mail_validate(value):
raise ValidationError(_("%s is not a valid email.", value))
if bank.proxy_type == "br_cpf_cnpj" and (
not self.partner_id.check_vat_br(value) or any(not char.isdecimal() for char in value)
):
raise ValidationError(_("%s is not a valid CPF or CNPJ (don't include periods or dashes).", value))
if bank.proxy_type == "mobile" and (not value or not value.startswith("+55") or len(value) != 14):
raise ValidationError(
_(
"The mobile number %s is invalid. It must start with +55, contain a 2 digit territory or state code followed by a 9 digit number.",
value,
)
)
regex = r"%(char)s{8}-%(char)s{4}-%(char)s{4}-%(char)s{4}-%(char)s{12}" % {"char": "[a-fA-F0-9]"}
if bank.proxy_type == "br_random" and not re.fullmatch(regex, bank.proxy_value):
raise ValidationError(
_(
"The random key %s is invalid, the format looks like this: 71d6c6e1-64ea-4a11-9560-a10870c40ca2",
value,
)
)
@api.depends('country_code')
def _compute_country_proxy_keys(self):
bank_br = self.filtered(lambda b: b.country_code == 'BR')
bank_br.country_proxy_keys = 'email,mobile,br_cpf_cnpj,br_random'
super(ResPartnerBank, self - bank_br)._compute_country_proxy_keys()
@api.depends("country_code")
def _compute_display_qr_setting(self):
"""Override."""
bank_br = self.filtered(lambda b: b.country_code == "BR")
bank_br.display_qr_setting = True
super(ResPartnerBank, self - bank_br)._compute_display_qr_setting()
def _get_additional_data_field(self, comment):
"""Override."""
if self.country_code == "BR":
# Only include characters allowed by the Pix spec.
return self._serialize(5, re.sub(r"[^a-zA-Z0-9*]", "", comment))
return super()._get_additional_data_field(comment)
def _get_qr_code_vals_list(self, *args, **kwargs):
"""Override. Force the amount field to always have two decimals. Uppercase the merchant name and merchant city.
Although not specified explicitly in the spec, not uppercasing causes errors when scanning the code. Also ensure
there is always some comment set."""
res = super()._get_qr_code_vals_list(*args, **kwargs)
if self.country_code == "BR":
res[5] = (res[5][0], float_repr(res[5][1], 2) if res[5][1] else None) # amount
res[7] = (res[7][0], re.sub(r"[^a-zA-Z0-9 ]", "", res[7][1]).upper()) # merchant_name
res[8] = (res[8][0], res[8][1].upper()) # merchant_city
if not res[9][1]:
res[9] = (res[9][0], self._get_additional_data_field("***")) # default comment if none is set
return res
def _get_merchant_account_info(self):
"""Override."""
if self.country_code == "BR":
merchant_account_info_data = (
(0, "br.gov.bcb.pix"), # GUI
(1, self.proxy_value), # key
)
return 26, "".join(self._serialize(*val) for val in merchant_account_info_data)
return super()._get_merchant_account_info()
def _get_error_messages_for_qr(self, qr_method, debtor_partner, currency):
"""Override."""
if qr_method == "emv_qr" and self.country_code == "BR":
if currency.name != "BRL":
return _("Can't generate a Pix QR code with a currency other than BRL.")
return None
return super()._get_error_messages_for_qr(qr_method, debtor_partner, currency)
def _check_for_qr_code_errors(
self, qr_method, amount, currency, debtor_partner, free_communication, structured_communication
):
"""Override."""
if (
qr_method == "emv_qr"
and self.country_code == "BR"
and self.proxy_type not in ("email", "mobile", "br_cpf_cnpj", "br_random")
):
return _(
"To generate a Pix code the proxy type for %s must be Email Address, Mobile Number, CPF/CNPJ (BR) or Random Key (BR).",
self.display_name,
)
return super()._check_for_qr_code_errors(
qr_method, amount, currency, debtor_partner, free_communication, structured_communication
)

View file

@ -0,0 +1,55 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.addons.account.models.chart_template import template
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
@template('br')
def _get_br_template_data(self):
return {
'code_digits': '6',
'property_account_receivable_id': 'account_template_101010401',
'property_account_payable_id': 'account_template_201010301',
}
@template('br', 'res.company')
def _get_br_res_company(self):
return {
self.env.company.id: {
'account_fiscal_country_id': 'base.br',
'bank_account_code_prefix': '1.01.01.02.00',
'cash_account_code_prefix': '1.01.01.01.00',
'transfer_account_code_prefix': '1.01.01.12.00',
'account_default_pos_receivable_account_id': 'account_template_101010402',
'income_currency_exchange_account_id': 'br_3_01_01_05_01_47',
'expense_currency_exchange_account_id': 'br_3_11_01_09_01_40',
'account_journal_early_pay_discount_loss_account_id': 'account_template_31101010202',
'account_journal_early_pay_discount_gain_account_id': 'account_template_30101050148',
'account_sale_tax_id': 'tax_template_out_icms_interno17',
'account_purchase_tax_id': 'tax_template_in_icms_interno17',
'expense_account_id': 'account_template_30101030101',
'income_account_id': 'account_template_30101010105',
'account_stock_journal_id': 'inventory_valuation',
'account_stock_valuation_id': 'account_template_101030401',
},
}
@template('br', 'account.journal')
def _get_br_account_journal(self):
return {
'sale': {
'l10n_br_invoice_serial': '1',
'refund_sequence': False,
},
}
@template('br', 'account.account')
def _get_br_account_account(self):
return {
'account_template_101030401': {
'account_stock_expense_id': 'account_template_30101030102',
'account_stock_variation_id': 'account_template_101030405',
},
}

View file

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
l10n_br.access_l10n_br_zip_range_group_manager,access_l10n_br_zip_range,l10n_br.model_l10n_br_zip_range,base.group_partner_manager,1,1,1,1
l10n_br.access_l10n_br_zip_range_group_user,access_l10n_br_zip_range,l10n_br.model_l10n_br_zip_range,base.group_user,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 l10n_br.access_l10n_br_zip_range_group_manager access_l10n_br_zip_range l10n_br.model_l10n_br_zip_range base.group_partner_manager 1 1 1 1
3 l10n_br.access_l10n_br_zip_range_group_user access_l10n_br_zip_range l10n_br.model_l10n_br_zip_range base.group_user 1 0 0 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 155 KiB

View file

@ -0,0 +1,106 @@
import { patch } from '@web/core/utils/patch';
import { patchDynamicContent } from '@web/public/utils';
import { CustomerAddress } from '@portal/interactions/address';
import { SelectMenuWrapper } from '@l10n_latam_base/components/select_menu_wrapper/select_menu_wrapper';
patch(CustomerAddress.prototype, {
setup() {
super.setup();
patchDynamicContent(this.dynamicContent, {
'input[name="zip"]': { 't-on-input': this.onChangeZip.bind(this) },
'.o_select_city': { 't-on-change': this.onChangeBrazilianCity.bind(this) },
});
this.citySelect = this.el.querySelector('select[name="city_id"]');
},
async willStart() {
await this.waitFor(super.willStart());
if (this.countryCode !== 'BR') return;
this.mountComponent(
this.citySelect.parentElement, SelectMenuWrapper, { el: this.citySelect }
);
await this._onChangeCountry();
},
_selectState(id) {
this.addressForm.querySelector(
`select[name="state_id"] > option[value="${id}"]`
).selected = 'selected';
},
onChangeZip() {
if (this.countryCode !== 'BR' || this._getSelectedCountryCode() !== 'BR') return;
const newZip = this.addressForm.zip.value.padEnd(5, '0');
for (const option of this.addressForm.querySelectorAll('.o_select_city option')) {
const ranges = option.getAttribute('zip-ranges');
if (ranges) {
// Parse the l10n_br_zip_ranges field (e.g. "[01000-001 05999-999] [08000-000 08499-999]").
// Loop over each range that is enclosed in [] (e.g. "[01000-001 05999-999]" followed by "[08000-000 08499-999]").
for (let range of ranges.matchAll(/\[[^[]+]/g)) {
// Remove square brackets (after this, range is e.g. "01000-001 05999-999")
range = range[0].replace(/[[\]]/g, '');
const [start, end] = range.split(' ');
// Rely on lexicographical order to figure out if the new zip is in this range.
if (newZip >= start && newZip <= end) {
this.citySelect.dispatchEvent(
new CustomEvent('select', { detail: { value: option.value } })
);
option.selected = 'selected';
this._selectState(option.getAttribute('state-id'));
return;
}
}
}
}
},
onChangeBrazilianCity() {
if (this.countryCode !== 'BR' || this._getSelectedCountryCode() !== 'BR') return;
if (this.addressForm.city_id.value) {
this._selectState(
this.addressForm.city_id
.querySelector(`option[value='${this.addressForm.city_id.value}']`)
.getAttribute('state-id')
);
}
},
_setVisibility(selector, should_show) {
this.addressForm.querySelectorAll(selector).forEach((el) => {
if (should_show) {
el.classList.remove('d-none');
} else {
el.classList.add('d-none');
}
// Disable hidden inputs to avoid sending back e.g. an empty street when street_name and street_number is
// filled. It causes street_name and street_number to be lost.
if (el.tagName === 'INPUT') {
el.disabled = !should_show;
}
el.querySelectorAll('input').forEach((input) => (input.disabled = !should_show));
});
},
async _onChangeCountry(init=false) {
await this.waitFor(super._onChangeCountry(...arguments));
if (this.countryCode !== 'BR') return;
if (this._getSelectedCountryCode() === 'BR') {
this._setVisibility('.o_standard_address', false); // hide
this._setVisibility('.o_extended_address', true); // show
this.onChangeZip();
} else {
this._setVisibility('.o_standard_address', true); // show
this._setVisibility('.o_extended_address', false); // hide
}
},
});

View file

@ -0,0 +1,4 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import test_l10n_br_fiscal_position
from . import test_l10n_br_pix

View file

@ -0,0 +1,46 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
from odoo.tests import tagged
@tagged("post_install_l10n", "post_install", "-at_install")
class TestL10nBrFiscalPosition(AccountTestInvoicingCommon):
@classmethod
@AccountTestInvoicingCommon.setup_country('br')
def setUpClass(cls):
super().setUpClass()
cls.br_company = cls.company_data['company']
def test_get_fiscal_position_multicompany(self):
"""When a partner has a fiscal position on both a BR company and
another (non-BR) company, calling _get_fiscal_position from the BR company
should return the BR fiscal position, not the one from the other company."""
other_company = self.env['res.company'].create({
'name': 'Other Company',
'country_id': self.env.ref('base.us').id,
})
other_fp = self.env['account.fiscal.position'].create({
'name': 'Other Company FP',
'company_id': other_company.id,
'sequence': 1,
})
br_fp = self.env['account.fiscal.position'].create({
'name': 'BR Manual FP',
'company_id': self.br_company.id,
'sequence': 2,
})
partner = self.env['res.partner'].with_company(other_company).create({
'name': 'Test Partner',
'country_id': self.env.ref('base.br').id,
'property_account_position_id': other_fp.id,
})
partner.with_company(self.br_company).property_account_position_id = br_fp
fiscal_position = self.env['account.fiscal.position'].with_company(self.br_company)._get_fiscal_position(partner)
self.assertEqual(
fiscal_position, br_fp,
"Should return the BR fiscal position, not the fiscal position from another company",
)

View file

@ -0,0 +1,104 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import Command
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
from odoo.exceptions import ValidationError
from odoo.tests import tagged
@tagged("post_install_l10n", "post_install", "-at_install")
class TestL10nBrPix(AccountTestInvoicingCommon):
@classmethod
@AccountTestInvoicingCommon.setup_country('br')
def setUpClass(cls):
super().setUpClass()
cls.partner_bank = cls.env["res.partner.bank"].create(
{
"acc_number": "123456789012345678",
"partner_id": cls.company_data["company"].partner_id.id,
"proxy_type": "br_random",
"proxy_value": "71d6c6e1-64ea-4a11-9560-a10870c40ca2",
"include_reference": True,
}
)
cls.invoice = cls.env["account.move"].create(
{
"move_type": "out_invoice",
"partner_id": cls.partner_a.id,
"partner_bank_id": cls.partner_bank.id,
"invoice_line_ids": [
Command.create({"quantity": 1, "price_unit": 12.30})
], # .30 to make sure we keep the trailing zero
}
)
def test_constraints(self):
self.partner_bank.write({"proxy_type": "email", "proxy_value": "a@example.com"})
with self.assertRaises(ValidationError, msg="not a valid email"):
self.partner_bank.proxy_value = "example.com"
self.partner_bank.write({"proxy_type": "br_cpf_cnpj", "proxy_value": "00740886967"})
with self.assertRaises(ValidationError, msg="not a valid CPF"):
self.partner_bank.proxy_value = "444444321"
self.partner_bank.write({"proxy_type": "mobile", "proxy_value": "+5561912345678"})
with self.assertRaises(ValidationError, msg="The mobile number"):
self.partner_bank.proxy_value = "061912345678"
self.partner_bank.write({"proxy_type": "br_random", "proxy_value": "71d6c6e1-64ea-4a11-9560-a10870c40ca2"})
with self.assertRaises(ValidationError, msg="The random key"):
self.partner_bank.proxy_value = "not a random key"
def _get_qr_code_string(self):
self.invoice.qr_code_method = "emv_qr"
demo_payment_reference = "NFe TÉST 0001" # É and spaces should be removed
emv_qr_vals = self.invoice.partner_bank_id._get_qr_vals(
qr_method=self.invoice.qr_code_method,
amount=self.invoice.amount_residual,
currency=self.invoice.currency_id,
debtor_partner=self.invoice.partner_id,
free_communication=demo_payment_reference,
structured_communication=None,
)
return "".join(emv_qr_vals)
def test_get_qr_vals(self):
self.assertEqual(
self._get_qr_code_string(),
"00020101021226580014br.gov.bcb.pix013671d6c6e1-64ea-4a11-9560-a10870c40ca2520400005303986540512.305802BR5912COMPANY1DATA62150511NFeTEST00016304A5C7",
)
def test_get_qr_vals_without_reference(self):
self.partner_bank.include_reference = False
self.assertEqual(
self._get_qr_code_string(),
"00020101021226580014br.gov.bcb.pix013671d6c6e1-64ea-4a11-9560-a10870c40ca2520400005303986540512.305802BR5912COMPANY1DATA62070503***6304F1E4",
)
def test_get_qr_vals_for_pos_default_qr(self):
self.partner_bank.include_reference = False
self.invoice.invoice_line_ids.price_unit = 0
qr_code_str = (
"00020101021226580014br.gov.bcb.pix013671d6c6e1-64ea-4a11-9560-"
"a10870c40ca25204000053039865802BR5912COMPANY1DATA62070503***630490CA"
)
self.assertEqual(
self._get_qr_code_string(),
qr_code_str,
)
self.invoice.invoice_line_ids.price_unit = 0.01
self.assertNotEqual(
self._get_qr_code_string(),
qr_code_str,
"An invoice line of $0.01 shouldn't return the same code as $0.00",
)
def test_get_qr_vals_company_with_emoji(self):
self.partner_bank.include_reference = False
self.env.company.name = "Company with émoji 😇"
self.assertEqual(
self._get_qr_code_string(),
"00020101021226580014br.gov.bcb.pix013671d6c6e1-64ea-4a11-9560-a10870c40ca2520400005303986540512.305802BR5919COMPANY WITH EMOJI 62070503***63043984",
)

View file

@ -7,7 +7,7 @@
<field name="inherit_id" ref="account.view_account_position_form"/>
<field name="arch" type="xml">
<field name="auto_apply" position="after">
<field name="l10n_br_fp_type" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_fp_type" options="{'no_open': True, 'no_create': True}" invisible="country_id != %(base.br)d"/>
</field>
</field>
</record>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_account_journal_form" model="ir.ui.view">
<field name="model">account.journal</field>
<field name="name">account.journal.form</field>
<field name="inherit_id" ref="l10n_latam_invoice_document.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="type" position="after">
<field name="l10n_br_invoice_serial" invisible="not l10n_latam_use_documents or country_code != 'BR'"/>
</field>
</field>
</record>
</data>
</odoo>

View file

@ -1,32 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Include fields created in account.tax and account.tax.template form views -->
<record model="ir.ui.view" id="view_l10n_br_account_tax_template_form">
<field name="name">l10n_br_account.tax.template.form</field>
<field name="model">account.tax.template</field>
<field name="inherit_id" ref="account.view_account_tax_template_form"/>
<field name="arch" type="xml">
<field position="after" name="price_include">
<field name="tax_discount"/>
</field>
<field position="after" name="tax_discount">
<field name="base_reduction" widget="monetary"/>
<field name="amount_mva" widget="monetary"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_l10n_br_account_tax_form">
<field name="name">l10n_br_account.tax.form</field>
<field name="model">account.tax</field>
<field name="inherit_id" ref="account.view_tax_form"/>
<field name="arch" type="xml">
<field position="after" name="price_include">
<field name="tax_discount" attrs="{'invisible': [('country_code', '!=', 'BR')]}"/>
<field name="tax_discount" invisible="country_code != 'BR'"/>
</field>
<field position="after" name="tax_discount">
<field name="base_reduction" widget="monetary" attrs="{'invisible': [('country_code', '!=', 'BR')]}"/>
<field name="amount_mva" widget="monetary" attrs="{'invisible': [('country_code', '!=', 'BR')]}"/>
<field name="base_reduction" widget="monetary" invisible="country_code != 'BR'"/>
<field name="amount_mva" widget="monetary" invisible="country_code != 'BR'"/>
</field>
</field>
</record>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem
id="brazilian_accounting_menu"
name="Brazil"
parent="account.menu_finance_configuration"
sequence="25"/>
</odoo>

View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="address_form_fields" inherit_id="portal.address_form_fields">
<!-- o_city must remain in DOM, otherwise the standard portal js breaks. -->
<input id="o_city" position="attributes">
<attribute name="class" separator=" " add="o_standard_address"/>
</input>
<input id="o_city" position="after">
<div t-if="res_company.account_fiscal_country_id.code == 'BR'" class="o_select_city">
<!-- will be replaced with SelectMenuWrapper -->
<select id="o_city_id" name="city_id" class="form-select">
<option value="">City...</option>
<option
t-foreach="cities_sudo"
t-as="c"
t-att-value="c.id"
t-att-selected="c.id == city_sudo.id"
t-att-code="c.id"
t-att-state-id="c.state_id.id"
t-att-zip-ranges="c.l10n_br_zip_ranges"
t-out="c.name"
/>
</select>
</div>
</input>
<!-- put base_address_extended fields separately to be more user-friendly -->
<div id="div_street" position="attributes">
<attribute name="class" separator=" " add="o_standard_address"/>
</div>
<div id="div_street" position="after">
<t t-if="res_company.account_fiscal_country_id.code == 'BR'">
<div id="div_street_name" t-attf-class="col-lg-8 mb-2 o_extended_address">
<label class="col-form-label" for="o_street_name">Street</label>
<input
id="o_street_name"
type="text"
name="street_name"
class="form-control"
t-att-value="partner_sudo.street_name"
/>
</div>
<div id="div_street_number" t-attf-class="col-lg-4 mb-2 o_extended_address">
<label class="col-form-label" for="o_street_number">Street Number</label>
<input
id="o_street_number"
type="text"
name="street_number"
class="form-control"
t-att-value="partner_sudo.street_number"
/>
</div>
<div class="w-100"/>
<div id="div_street_number2" t-attf-class="col-lg-6 mb-2 o_extended_address">
<label class="col-form-label label-optional" for="o_street_number2">
Complement
</label>
<input
id="o_street_number2"
type="text"
name="street_number2"
class="form-control"
t-att-value="partner_sudo.street_number2"
/>
</div>
<div id="div_street2" position="move"/>
</t>
</div>
<!-- street2 is used for neighborhood in Brazil, change the default label -->
<label for="o_street2" position="attributes">
<attribute name="class" separator=" " add="o_standard_address"/>
</label>
<label for="o_street2" position="after">
<label
t-if="res_company.account_fiscal_country_id.code == 'BR'"
class="col-form-label label-optional o_extended_address"
for="o_street2"
>
Neighborhood
</label>
</label>
</template>
</odoo>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_bank_form_inherit_account" model="ir.ui.view">
<field name="name">res.partner.bank.form.inherit</field>
<field name="model">res.partner.bank</field>
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="arch" type="xml">
<field name="include_reference" position="after">
<p invisible="country_code != 'BR'">
<widget name="documentation_link" path="/applications/finance/fiscal_localizations/brazil.html" label="Documentation"/>
</p>
</field>
</field>
</record>
</odoo>

View file

@ -6,10 +6,9 @@
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="l10n_br_cpf_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_ie_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_im_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_nire_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_ie_code" invisible="country_id != %(base.br)d"/>
<field name="l10n_br_im_code" invisible="country_id != %(base.br)d"/>
<field name="l10n_br_nire_code" invisible="country_id != %(base.br)d"/>
</xpath>
</field>
</record>

View file

@ -1,16 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="br_partner_address_form" model="ir.ui.view">
<field name="name">partner.form.address.extended</field>
<field name="model">res.partner</field>
<field name="priority" eval="900"/>
<field name="arch" type="xml">
<form>
<div class="o_address_format">
<field name="country_enforce_cities" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="street" placeholder="Street..." class="o_address_street oe_read_only"
readonly="type == 'contact' and parent_id"/>
<div class="oe_edit_only o_row">
<field name="street_name" placeholder="Street" style="flex: 3 1 auto"
readonly="type == 'contact' and parent_id"/>
<span> </span>
<field name="street_number" placeholder="Street #" style="flex: 1 1 auto"
readonly="type == 'contact' and parent_id"/>
<span> - </span>
<field name="street_number2" placeholder="Complement" style="flex: 1 1 auto"
readonly="type == 'contact' and parent_id"/>
</div>
<field name="street2" placeholder="Neighborhood" class="o_address_street"
readonly="type == 'contact' and parent_id"/>
<field name="city_id"
placeholder="City"
class="o_address_city"
domain="[('country_id', '=', country_id)]"
invisible="not country_enforce_cities"
readonly="type == 'contact' and parent_id"
context="{'default_country_id': country_id, 'default_state_id': state_id, 'default_zipcode': zip}"/>
<field name="city"
placeholder="City"
class="o_address_city"
invisible="country_enforce_cities and (city_id or city in ('', False))"
readonly="type == 'contact' and parent_id"/>
<field name="state_id"
class="o_address_state"
placeholder="State"
readonly="type == 'contact' and parent_id"
options="{'no_open': True, 'no_quick_create': True}"
context="{'default_country_id': country_id}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip"
readonly="type == 'contact' and parent_id"/>
<field name="country_id"
placeholder="Country"
class="o_address_country"
readonly="type == 'contact' and parent_id"
options="{'no_open': True, 'no_create': True}"/>
</div>
</form>
</field>
</record>
<record id="br_partner_tax_fields_form" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="l10n_br_cpf_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_ie_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_im_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_isuf_code" attrs="{'invisible': [('country_id', '!=', %(base.br)d)]}"/>
<field name="l10n_br_ie_code" invisible="'BR' not in fiscal_country_codes"/>
<field name="l10n_br_im_code" invisible="'BR' not in fiscal_country_codes"/>
<field name="l10n_br_isuf_code" invisible="'BR' not in fiscal_country_codes"/>
</xpath>
</field>
</record>

View file

@ -0,0 +1,2 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import account_move_reversal

View file

@ -0,0 +1,19 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountMoveReversal(models.TransientModel):
_inherit = "account.move.reversal"
def _compute_document_type(self):
""" If a l10n_latam_document_type_id was set, change it in the case of Brazil to be
the same as the move that is being reversed.
"""
res = super()._compute_document_type()
for reversal in self.filtered("l10n_latam_document_type_id"):
# LATAM invoices are guaranteed to be just one by _compute_documents_info().
move = reversal.move_ids[0]
if move.country_code == "BR":
reversal.l10n_latam_document_type_id = move.l10n_latam_document_type_id
return res

View file

@ -1,13 +1,18 @@
[project]
name = "odoo-bringout-oca-ocb-l10n_br"
version = "16.0.0"
description = "Brazilian - Accounting - Odoo addon"
description = "Brazilian - Accounting -
Odoo addon
"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-account>=16.0.0",
"odoo-bringout-oca-ocb-base_vat>=16.0.0",
"odoo-bringout-oca-ocb-account>=19.0.0",
"TODO_MAP-account_qr_code_emv>=19.0.0",
"odoo-bringout-oca-ocb-base_address_extended>=19.0.0",
"odoo-bringout-oca-ocb-l10n_latam_base>=19.0.0",
"odoo-bringout-oca-ocb-l10n_latam_invoice_document>=19.0.0",
"requests>=2.25.1"
]
readme = "README.md"
@ -17,7 +22,7 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]