巴西¶
介绍¶
With the Brazilian localization, sales taxes can be automatically computed and electronic invoices (NF-e) for goods can be sent using AvaTax (Avalara) through API calls. Moreover, taxes for services can be configured.
For the goods tax computation and electronic invoicing process, you need to configure the contacts, company, products, and create an account in Avatax need to be configured in the general settings.
For the services taxes, you can create and configure them from Odoo directly without computing them with AvaTax.
The localization also includes taxes and a chart of accounts template that can be modified if needed.
配置¶
安装 巴西 财务本地化服务包 以获得巴西本地化的所有默认会计功能,并遵循:abbr:IFRS(国际财务报告标准)
规则。
Configure your company¶
To configure your company information, go to the
app and search the name given to your company.选择页面顶部的 公司 选项。然后,配置以下字段:
名称。
地址 (添加 城市, 州/市, 邮政编码, 国家/地区 )。
在:guilabel:
街道
字段中,输入街道名称、编号和其他地址信息。In the Street 2 field, enter the neighborhood.
Identification Number (CNPJ, CPF).
Tax ID (associated with the identification type).
IE (State registration).
IM (Municipal registration).
SUFRAMA code (Superintendence of the Manaus Free Trade Zone - add if applicable).
Phone.
Email.
Configure the Fiscal Information within the Sales and Purchase tab:
Add the Fiscal Position for Avatax Brazil.
Tax Regime (Federal Tax Regime).
ICMS Taxpayer Type (indicates ICMS regime, Exempt status, or Non-Taxpayer).
Main Activity Sector.
Finally, upload a company logo and save the contact
注解
If you are a simplified regime, you need to configure the ICMS rate under
.Configure AvaTax integration¶
Avalara AvaTax 是一个税款计算和电子发票提供商,可整合至 Odoo 系统,通过考虑公司、联系人(客户)、产品和交易信息自动计算税款,检索出正确的税款,然后向政府处理电子发票。
Using this integration requires In-App-Purchases (IAPs) to compute the taxes and to send the electronic invoices. Whenever you compute taxes, an API call is made using credits from your IAP credits balance.
注解
Odoo 是 Avalara Brazil 公司的认证合作伙伴。
凭证配置¶
要在 Odoo 中激活 AvaTax,您需要创建一个账户。请进入 AvaTax Brazil 部分,在 Avatax Portal Email 中添加用于 AvaTax 门户网站的管理电子邮件地址,然后点击 创建账户。
,警告
在测试或沙箱数据库中**测试** :guilabel:`Avatax 门户电子邮件`整合时,请使用备用电子邮件地址。不能在生产数据库中重复使用相同的电子邮件地址。
从 Odoo 创建账户后,您需要进入 Avalara 门户设置密码:
访问 Avalara 门户网站。
Click on Meu primeiro acesso.
Add the email address you used in Odoo to create the Avalara/Avatax account, and then click Solicitar Senha.
您将收到一封电子邮件,其中包含一个令牌和一个创建密码的链接。点击该链接并复制粘贴令牌,即可分配您所需的密码。
小技巧
您可以开始使用 Odoo 中的 AvaTax 进行税务计算,**无需**创建密码和访问 Odoo 数据库中的 Avalara 门户。但是,为了使用电子发票服务,您**必须**访问 AvaTax 门户网站并上传您的证书。

注解
您可以转移 API 证书。只有当您已在另一个 Odoo 实例中创建了账户并希望重复使用该账户时,才可使用此功能。
A1 证书上传¶
为了开具电子发票,需要将证书上传到`AvaTax 门户网站 <https://portal.avalarabrasil.com.br/Login>`_。
只要 AvaTax 门户中的外部识别码(不含特殊字符)与 CNPJ 编号一致,且 Odoo 中的识别码 (CNPJ) 与 AvaTax 中的 CNPJ 一致,证书就会与 Odoo 同步。
Configure master data¶
科目表¶
The chart of accounts is installed by default as part of the data set included in the localization module. The accounts are mapped automatically in their corresponding taxes, and the default account payable and account receivable fields.
注解
The chart of accounts for Brazil is based on the SPED CoA, which gives a baseline of the accounts needed in Brazil.
You can add or delete accounts according to the company’s needs.
日记账¶
在巴西,*系列*号与电子发票的序列号范围相关联。系列号可通过 系列 字段在 Odoo 的销售日记账上配置。如果需要一个以上的系列号,则需要创建一个新的销售日记账,并为每个系列号分配一个新的系列号。
需要选择 使用文档 字段。开具电子发票和非电子发票时,类型 字段选择创建发票时使用的文档类型。只有在日记账中选择了 使用文档 字段,才会显示 类型 字段。

注解
When creating the journal, ensure the field Dedicated Credit Note Sequence is unchecked, as in Brazil, sequences between invoices, credit notes, and debit notes are shared per series number, which means per journal.
税¶
安装巴西本地化软件时会自动创建税项。Avalara 在计算销售订单或发票上的税额时,会使用已配置的税额。
可以编辑税项或添加更多税项。例如,用于服务的某些税项需要手动添加和配置,因为税项可能因提供服务的城市而异。
重要
Taxes attached to services are not computed by AvaTax. Only goods taxes are computed.
When configuring a tax used for a service that is included in the final price (when the tax is not added or subtracted on top of the product price), set the Tax Computation to Percentage of Price Tax Included, and, on the Advanced Options tab, check the Included in Price option.

警告
Do not delete taxes, as they are used for the AvaTax tax computation. If deleted, Odoo creates them again when used in an SO or invoice and computing taxes with AvaTax, but the account used to register the tax needs to be re-configured in the tax’s Definition tab, under the Distribution for invoices and Distribution for refunds sections.
产品¶
To use the AvaTax integration on sale orders and invoices, first specify the following information on the product:
CEST Code (Code for products subject to ICMS tax substitution).
Mercosul NCM Code (Mercosur Common Nomenclature Product Code).
Source of Origin (Indicates the origin of the product, which can be foreign or domestic, among other possible options depending on the specific use case).
SPED Fiscal Product Type (Fiscal product type according to SPED list table).
Purpose of Use (Specify the intended purpose of use for this product).

注解
Odoo automatically creates three products to be used for transportation costs associated with
sales. These are named Freight
, Insurance
, and Other Costs
. They are already configured, if
more need to be created, duplicate and use the same configuration (configuration needed:
Product Type Service
, Transportation Cost Type Insurance
, Freight
,
or Other Costs
).
联系人¶
Before using the integration, specify the following information on the contact:
General information about the contact:
Select the Company option for a contact with a tax ID (CNPJ), or check Individual for a contact with a CPF.
名称。
地址 (添加 城市, 州/市, 邮政编码, 国家/地区 )。
In the Street field, enter the street, number, and any extra address information.
In the Street 2 field, enter the neighborhood.
Identification Number (CNPJ, CPF).
Tax ID (associated with the identification type).
IE: state tax identification number.
IM: municipal tax identification number.
SUFRAMA code: SUFRAMA registration number.
Phone.
Email.
注解
The CPF, IE, IM, and SUFRAMA code fields are are hidden until the Country is set to
Brazil
.Fiscal information about the contact under the Sales & Purchase tab:
Fiscal Position: add the AvaTax fiscal position to automatically compute taxes on sale orders and invoices automatically
Tax Regime: federal tax regime
ICMS Taxpayer Type: taxpayer type determines if the contact is within the ICMS regime, if it is exempt, or if it is a non-taxpayer
Main Activity Sector: list of main activity sectors of the contact
Fiscal positions¶
To compute taxes and send electronic invoices on sale orders and invoices, both the Detect Automatically and the Use AvaTax API options need to be enabled in the Fiscal Position.
The Fiscal Position can be configured on the contact or selected when creating a sales order or an invoice.

工作流¶
This section provides an overview of the actions that trigger API calls for tax computation, and how to send an electronic invoice for goods (NF-e) for government validation.
警告
Please note that each API call incurs a cost. Be mindful of the actions that trigger these calls to manage costs effectively.
Tax computation¶
Tax calculations on quotations and sales orders¶
Trigger an API call to calculate taxes on a quotation or sales order automatically with AvaTax in any of the following ways:
- Quotation confirmation
Confirm a quotation into a sales order.
- Manual trigger
Click on Compute Taxes Using Avatax.
- Preview
Click on the Preview button.
- Email a quotation / sales order
Send a quotation or sales order to a customer via email.
- Online quotation access
When a customer accesses the quotation online (via the portal view), the API call is triggered.
Tax calculations on invoices¶
Trigger an API call to calculate taxes on a customer invoice automatically with AvaTax any of the following ways:
- Manual trigger
Click on Compute Taxes Using AvaTax.
- Preview
Click on the Preview button.
- Online invoice access
When a customer accesses the invoice online (via the portal view), the API call is triggered.
注解
The Fiscal Position must be set to Automatic Tax Mapping (Avalara Brazil)
for any
of these actions to compute taxes automatically.
电子文档¶
客户开票¶
要处理货物电子发票(NF-e),Avalara 需要确认发票并计算税款。完成该步骤后,点击左上角的 发送打印 按钮,弹出一个窗口。然后点击 处理电子发票 和其他选项 - 下载 或 电子邮件。最后,点击 发送打印 处理政府发票。
在发送电子货物发票(NF-e)之前,需要在发票上填写一些字段:
Customer with all the customer information
Payment Method: Brazil (how the invoice is planned to be paid)
Fiscal Position set as the Automatic Tax Mapping (Avalara Brazil)
- Document Type set as (55) Electronic Invoice (NF-e). This is the only
electronic document supported at the moment. Non-electronic invoices can be registered, and other document types can be activated if needed
还有一些其他可选字段取决于交易的性质。这些字段不是必填字段,因此在大多数情况下,如果没有填写这些可选字段,政府不会出错:
Freight Model determines how the goods are planned to be transported - domestic
Transporter Brazil determines who is doing the transportation


注解
如果需要,用于开具电子发票的发票上的所有字段也可在销售订单上使用。创建第一张发票时,会显示 文档编号 字段,并将其分配为第一个编号,在后续发票中按顺序使用。
Credit notes¶
If a sales return needs to be registered, then a credit note can be created in Odoo to be sent to the government for validation.
借记单¶
If additional information needs to be included, or values need to be corrected that were not accurately provided in the original invoice, a debit note can be issued.
重要
只有原始发票中包含的产品才能成为借记单的一部分。虽然可以更改产品单价或数量,但**不能**将产品添加到借记单中。本文件的目的仅是声明您要向原始发票添加的金额,用于相同数量或更少的产品。
开票取消¶
It is possible to cancel an electronic invoice that was validated by the government.
重要
检查电子发票是否仍在取消期限内,各州/市的法律规定可能有所不同。
这可在 Odoo 中通过点击 请求取消 并在弹出窗口中添加取消 原因 来实现。如果要通过电子邮件将取消原因发送给客户,请激活 E-mail 复选框。

Correction letter¶
A correction letter can be created and linked to an electronic invoice that was validated by the government.
This can be done in Odoo by clicking Correction Letter and adding a correction Reason on the pop-up that appears. To send this correction reason to a customer via email, activate the E-mail checkbox.

Invalidate invoice number range¶
分配给销售日记账的序列范围,如果当前未使用,将来**也**不会使用,则可通过政府使其失效。请导航至日记账,然后单击 无效编号范围(BR) 向导中,添加要取消的范围的 初始编号 和 结束编号,并输入无效的 原因。
。在

注解
The log of the canceled numbers along with the XML file are recorded in the chatter of the journal.
供应商账单¶
On the vendor bills side, when receiving an invoice from a supplier, you can encode the bill in Odoo by adding all the commercial information together with the same Brazilian specific information that is recorded on the customer invoices.
These Brazilian specific fields are:
Payment Method: Brazil (how the invoice is planned to be paid).
Document Type used by your vendor.
Document Number (the invoice number from your supplier).
Freight Model (how goods are planned to be transported - domestic).
Transporter Brazil (who is doing the transportation).