巴西

介绍

With the Brazilian localization, sales taxes can be automatically computed and electronic invoices for goods (NF-e) and services (NFS-e) can be sent using AvaTax (Avalara) through API calls. Moreover, taxes for services can be configured.

For the goods and services tax computation and electronic invoicing process, you need to configure the contacts, company, products, and create an account in AvaTax which needs 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.

配置

模块安装

Install the following modules to get all the features of the Brazilian localization:

名称

技术名称

描述

Brazilian - Accounting

l10n_br

Default fiscal localization package, which represents having the Generic Brazilian chart of accounts and Taxes, together with document types and identification types.

Brazil - Accounting Reports

l10n_br_reports

Accounting reports for Brazil.

AvaTax Brazil & AvaTax Brazil for Services

l10n_br_avatax & l10n_br_avatax_services

Goods and Services tax computation through Avalara.

Brazilian Accounting EDI & Brazilian Accounting EDI for services

l10n_br_edi & l10n_br_edi_services

Provides electronic invoicing for goods and services for Brazil through AvaTax.

Brazil Pix QR codes

l10n_br_pix

Implements Pix QR codes for Brazil.

Configure your company

To configure your company information, go to the Contacts app and search the name given to your company.

  1. 选择页面顶部的 公司 选项。然后,配置以下字段:

    • 名称

    • Address: add City, State, Zip Code, Country

      • 在:guilabel:街道 字段中,输入街道名称、编号和其他地址信息。

      • 街道 2 字段中,输入街区信息。

    • Identification Number: CNPJ or 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

    • 电话

    • 电子邮件

    公司配置
  2. 配置 销售及采购 选项卡中的 财务信息

    • 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

    公司财务配置。
  3. Configure the following extra Fiscal Information if you are going to issue NFS-e:

    • Add the Fiscal Position for AvaTax Brazil.

    • COFINS Details: Taxable, Not Taxable, Taxable with rate 0%, Exempt, Suspended

    • PIS Details Taxable, Not Taxable, Taxable with rate 0%, Exempt, Suspended

    • CSLL Taxable If the company is subject to CSLL or not

    Company fiscal configuration for NFSe.
  4. Finally, upload a company logo and save the contact.

注解

If you are a simplified regime, you need to configure the ICMS rate under Accounting ‣ Configuration ‣ Settings ‣ Taxes ‣ AvaTax Brazil.

配置 AvaTax 整合

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, send an electronic document (NF-e, NFS-e, etc), or perform any electronic flow (NF-e Cancellation, Correction letter, Invalidate invoice number range), an API call is made using credits from your IAP credits balance.

注解

凭证配置

To activate AvaTax in Odoo, you need to create an account. To do so, go to Accounting ‣ Configuration ‣ Settings ‣ Taxes, and in the AvaTax Brazil section, add the administration email address to be used for the AvaTax portal in the AvaTax Portal Email, and then click on Create account.

警告

When testing or creating a production AvaTax Portal Email integration in a sandbox or production database, use a real email address, as it is needed to log in to the Avalara Portal and set up the certificates, whether you want to test or use it on production.

There are two different Avalara Portals, one for testing and one for production:

When you create the account from Odoo, be sure to select the right environment. Moreover, the email used to open the account cannot be used to open another account. Save your API ID and API Key when you create the account from Odoo.

Transfer API Credentials.

从 Odoo 创建账户后,您需要进入 Avalara 门户设置密码:

  1. 访问 Avalara 门户网站

  2. 点击 Meu primeiro acesso

  3. Add the email address you used in Odoo to create the Avalara/AvaTax account, and then click Solicitar Senha.

  4. 您将收到一封电子邮件,其中包含一个令牌和一个创建密码的链接。点击该链接并复制粘贴令牌,即可分配您所需的密码。

小技巧

您可以开始使用 Odoo 中的 AvaTax 进行税务计算,**无需**创建密码和访问 Odoo 数据库中的 Avalara 门户。但是,为了使用电子发票服务,您**必须**访问 AvaTax 门户网站并上传您的证书。

AvaTax account configuration.

注解

您可以转移 API 证书。只有当您已在另一个 Odoo 实例中创建了账户并希望重复使用该账户时,才可使用此功能。

A1 证书上传

为了开具电子发票,需要将证书上传到`AvaTax 门户网站 <https://portal.avalarabrasil.com.br/Login>`_。

只要 AvaTax 门户中的外部识别码(不含特殊字符)与 CNPJ 编号一致,且 Odoo 中的识别码 (CNPJ) 与 AvaTax 中的 CNPJ 一致,证书就会与 Odoo 同步。

重要

To issue NFS-e, some cities require that you link the certificate within the City Portal system before issuing NFS-e from Odoo.

If you receive an error message from the city that says Your certificate is not linked to the user, that means this process needs to be done in the city portal.

配置主数据

科目表

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.

您可以根据公司需要添加或删除账户。

日记账

在巴西,*系列*号与电子发票的序列号范围相关联。系列号可通过 系列 字段在 Odoo 的销售日记账上配置。如果需要一个以上的系列号,则需要创建一个新的销售日记账,并为每个系列号分配一个新的系列号。

需要选择 使用文档 字段。开具电子发票和非电子发票时,类型 字段选择创建发票时使用的文档类型。只有在日记账中选择了 使用文档 字段,才会显示 类型 字段。

Journal configuration with the Use Documents? field checked.

注解

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 在计算销售订单或发票上的税额时,会使用已配置的税额。

可以编辑税项或添加更多税项。例如,用于服务的某些税项需要手动添加和配置,因为税项可能因提供服务的城市而异。

重要

If you decide to do service taxes manually, you won’t be able to issue an NFS-e. To electronically send an NFS-e, you need to compute taxes using Avalara.

警告

请勿删除税项,因为它们用于 AvaTax 税务计算。如果被删除,当在销售订单(SO)或发票中使用 AvaTax 计算税项时,Odoo 会重新创建这些税项,但是用于登记税项的账户需要在税项的:guilabel:`定义`选项卡下重新配置,包括:guilabel:`发票分配`和:guilabel:`退款分配`部分。

产品

To use the AvaTax integration on sale orders and invoices, first specify the following information on the product depending on its intended use:

E-Invoice for goods (NF-e)
  • 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 会自动创建三个产品,用于支付与销售相关的运输成本。它们分别被命名为 运费保险费`和`其他费用。它们已经配置好,如果需要创建更多产品,请复制并使用相同的配置(所需配置: 产品类型``服务运输成本类型``保险运费`或`其他成本)。

E-Invoice for services (NFS-e)
  • Mercosul NCM Code: Mercosur Common Nomenclature Product Code

  • Purpose of Use: Specify the intended purpose of use for this product

  • Service Code Origin: City Service Code where the provider is registered

  • Service Codes: City Service Code where the service will be provided, if no code is added, the Origin City Code will be used

  • Labor Assignment: Defines if your services includes labor

联系人

使用整合前,请在联系人上指定以下信息:

  1. 联系人的基本信息:

    • 如果联系人有税号(CNPJ),请选择 公司 选项;如果联系人有 CPF,请选择 个人

    • 名称

    • Address: add City, State, Zip Code, Country

      • 街道 字段中,输入街道、号码和其他地址信息。

      • 街道 2 字段中,输入街区信息。

    • Identification Number: CNPJ or CPF

    • Tax ID: associated with the identification type

    • IE: state tax identification number

    • IM: municipal tax identification number

    • SUFRAMA code: SUFRAMA registration number

    • 电话

    • 电子邮件

    联系人配置

    注解

    在将:guilabel:国家/地区`设置为`巴西`之前, :guilabel:`CPFIE、:guilabel:`IM`和 :guilabel:`SUFRAMA 代码`字段会被隐藏。

  2. 销售与采购 标签下查看联系人的财务信息:

    • 财政状况:添加 AvaTax 财政状况,自动计算销售订单和发票上的税金。

    • 税收制度:(联邦税制)

    • ICMS Taxpayer Type: taxpayer type determines if the contact is within the ICMS regime, Exempt status, or Non-taxpayer

    • Main Activity Sector: list of main activity sectors of the contact

    Contact fiscal configuration.
  3. Configure the following extra Fiscal Information if you are going to issue NFS-e:

    • Add the Fiscal Position for AvaTax Brazil

    • COFINS Details: Taxable, Not Taxable, Taxable with rate 0%, Exempt, Suspended

    • PIS Details: Taxable, Not Taxable, Taxable with rate 0%, Exempt, Suspended

    • CSLL Taxable: If the company is subject to CSLL or not

    Contact fiscal configuration for NFSe.

财政状况

要在销售订单和发票上计算税款和发送电子发票,需要在:guilabel:`财政状况`中启用:guilabel:`自动检测`和:guilabel:`使用 AvaTax API`选项。

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, along with instructions on how to send electronic invoices for goods (NF-e) and services (NFS-e) for government validation.

警告

请注意,每次 API 调用都会产生费用。请注意触发这些调用的操作,以便有效管理成本。

税费计算

报价单和销售订单的税款计算

通过以下任一方式触发 API 调用,使用 AvaTax 自动计算报价单或销售订单上的税款:

  • 报价确认

    将报价单确认为销售订单。

  • 手动触发

    点击 使用 AvaTax 计算税款

  • 预览

    点击 预览 按钮。

  • 通过电子邮件发送报价单/销售订单

    通过电子邮件向客户发送报价单或销售订单。

  • 在线报价

    当客户在线访问报价单时(通过门户视图),就会触发 API 调用。

Mirto Bonan

Trigger an API call to calculate taxes on a customer invoice automatically with AvaTax in any of the following ways:

  • 手动触发

    点击 使用 AvaTax 计算税款

  • 预览

    点击 预览 按钮。

  • 在线发票访问

    当客户在线(通过门户视图)访问发票时,就会触发 API 调用。

注解

必须将 财政状况 设为`自动税收映射(Avalara Brazil)`,这些操作才能自动计算税款。

电子文档

客户开票

To process an electronic invoice for goods (NF-e) or services (NFS-e), the invoice needs to be confirmed and taxes need to be computed by Avalara. Once that step is done, click on the Send & Print button in the upper left corner. In the pop-up that appears, click on Process e-invoice and any of the other options - Download or Email. Finally, click on Send & Print to process the invoice with the government.

Before sending the electronic invoice for goods (NF-e) or services (NFS-e), some fields need to be filled out on the invoice:

  • Customer, with all the customer information

  • Payment Method: Brazil: how the invoice is planned to be paid

  • 财政状况 设置为 自动税收映射(Avalara 巴西)

  • Document Type set as (55) Electronic Invoice (NF-e) or (SE) Electronic Service Invoice (NFS-e)

这些是根据交易性质而定的一些可选字段。这些字段不是必填字段,因此在大多数情况下,如果不填写这些可选字段,政府不会出现错误。

  • :guilabel:`货运模式`决定了计划运输货物的方式 - 国内运输

  • Transporter Brazil 决定由谁进行运输

处理电子发票所需的发票信息。 在 Odoo 中处理电子发票弹出窗口。

注解

如果需要,用于开具电子发票的发票上的所有字段也可在销售订单上使用。创建第一张发票时,会显示 文档编号 字段,并将其分配为第一个编号,在后续发票中按顺序使用。

贷记单

如果需要登记销售退货,则可在 Odoo 中创建贷记单据,发送给政府进行验证。

注解

Credit notes are only available for electronic invoices for goods (NF-e).

借记单

如果需要提供更多信息,或需要更正原始发票中未准确提供的价值,可出具借记单。

注解

Debit notes are only available for electronic invoices for goods (NF-e).

只有原始发票中包含的产品才能成为借记单的一部分。虽然可以更改产品单价或数量,但**不能**将产品添加到借记单中。本文件的目的仅是声明您要向原始发票添加的金额,用于相同数量或更少的产品。

开票取消

可以注销经政府验证的电子发票。

注解

检查电子发票是否仍在取消期限内,各州/市的法律规定可能有所不同。

E-invoices for goods (NF-e)

Cancel an e-invoice for goods (NF-e) in Odoo by clicking Request Cancel and adding a cancellation Reason on the pop-up that appears. If you want to send this cancellation reason to the customer via email, activate the E-mail checkbox.

Odoo 中的发票取消原因。

注解

This is an electronic cancellation, which means that Odoo will send a request to the government to cancel the NF-e, and it will then consume one IAP credit, as an API call occurs.

E-invoices for services (NFS-e)

Cancel an e-invoice for services (NFS-e) in Odoo by clicking Request Cancel. In this case, there is no electronic cancellation process, as not every city has this service available. The user needs to manually cancel this NFS-e on the city portal. Once that step is completed, they can request the cancellation in Odoo, which will cancel the invoice.

更正信

A correction letter can be created and linked to an electronic invoice for goods (NF-e) that was validated by the government.

在 Odoo 中点击 更正信 并在弹出的窗口中添加更正 原因 即可。要通过电子邮件将更正原因发送给客户,请激活 E-mail 复选框。

Odoo 中更正信件的原因。

注解

Correction letters are only available for electronic invoices for goods (NF-e).

发票号码范围无效

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

Odoo 中的数字范围无效选择。 Odoo 中的数字范围无效向导。

注解

Invalidate invoice number range documents are only available for electronic invoices for goods (NF-e).

注解

取消的编号以及 XML 文件的日志记录在日记账的聊天记录中。

供应商账单

在供应商账单方面,在收到供应商发票时,您可以通过将所有商业信息与记录在:ref:`客户发票 <brazil/electronic-documents>`上的相同的巴西特定信息一起添加到 Odoo 中来对账单进行编码。

这些巴西特定领域是:

  • 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: NF-e specific how goods are planned to be transported - domestic

  • Transporter Brazil: NF-e specific who is doing the transportation.