Brésil

Introduction

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.

Pour les taxes sur les services, vous pouvez les créer et les configurer directement à partir d’Odoo sans les calculer avec AvaTax.

La localisation comprend également les taxes et un modèle de plan comptable qui peut être modifié le cas échéant.

Configuration

Installation des modules

Installez les modules suivants pour bénéficier de toutes les fonctionnalités de la localisation brésilienne :

Nom

Nom technique

Description

Brézil - Comptabilité

l10n_br

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

Brésil - Rapports comptables

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.

Configurer votre société

Pour configurer les informations de votre société, allez à l’application Contacts et recherchez le nom donné à votre société.

  1. Sélectionnez l’option Société en haut de la page. Configurez ensuite les champs suivants :

    • Nom

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

      • In the Street field, enter the street name, number, and any additional address information.

      • In the Street 2 field, enter the neighborhood.

    • 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

    • Téléphone

    • Email

    Configuration de la société.
  2. Configurez les informations fiscales dans l’onglet Ventes & Achats :

    • Add the Fiscal Position for AvaTax Brazil.

    • Tax Regime: Federal Tax Regime

    • ICMS Taxpayer Type: indicates ICMS regime, Exempt status, or Non-Taxpayer

    • Secteur d’activité principal

    Configuration fiscale de la société.
  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. Enfin, chargez un logo de la société et enregistrez le contact.

Note

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

Configurer l’intégration d’AvaTax

Avalara AvaTax is a tax calculation and electronic invoicing provider that can be integrated in Odoo to automatically compute taxes by taking into account the company, contact (customer), product, and transaction information to retrieve the correct tax to be used and process the e-invoice afterward with the government.

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.

Note

Configuration des identifiants

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.

Avertissement

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.

Après avoir créé le compte dans Odoo, vous devez accéder au portail d’Avalara pour configurer votre mot de passe :

  1. Access the Avalara portal.

  2. Click on Meu primeiro acesso.

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

  4. Vous recevrez un email avec un jeton et un lien pour créer votre mot de passe. Cliquez sur ce lien et copiez-collez le jeton pour attribuer le mot de passe souhaité.

Astuce

You can start using AvaTax in Odoo for tax computation only without creating a password and accessing the Avalara portal in the Odoo database. However, in order to use the electronic invoice service, you must access the AvaTax portal and upload your certificate there.

AvaTax account configuration.

Note

You can transfer API credentials. Use this only when you have already created an account in another Odoo instance and wish to reuse it.

A1 certificate upload

In order to issue electronic invoices, a certificate needs to be uploaded to the AvaTax portal.

The certificate will be synchronized with Odoo, as long as the external identifier number in the AvaTax portal matches - without special characters - with the CNPJ number, and the identification number (CNPJ) in Odoo matches with the CNPJ in AvaTax.

Important

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.

Configurer les données de base

Plan comptable

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.

Note

Le plan comptable pour le Brésil est basé sur le SPED CoA, qui donne une base de référence des comptes nécessaires au Brésil.

Vous pouvez ajouter ou supprimer des comptes selon les besoins de l’entreprise.

Journaux

In Brazil, a series number is linked to a sequence number range for electronic invoices. The series number can be configured in Odoo on a sales journal from the Series field. If more than one series is needed, then a new sales journal will need to be created and a new series number assigned to it for each series needed.

The Use Documents field needs to be selected. When issuing electronic and non-electronic invoices, the Type field selects the document type used when creating the invoice. The Type field will only be displayed if the Use Documents field is selected on the journal.

Journal configuration with the Use Documents? field checked.

Note

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.

Taxes

Les taxes sont automatiquement créées lors de l’installation de la localisation brésilienne. Les taxes sont déjà configurées et certaines d’entre elles sont utilisées par Avalara lors du calcul des taxes sur la commande ou la facture.

Il est possible de modifier les taxes ou d’en ajouter d’autres. Par exemple, certaines taxes utilisées pour les services doivent être ajoutées et configurées manuellement, car le taux peut varier en fonction de la ville où vous offrez le service.

Important

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.

Avertissement

Ne supprimez pas les taxes, car elles sont utilisées dans le calcul de la taxe par AvaTax. Si vous les supprimez, Odoo les crée à nouveau lorsqu’elles sont utilisées dans une commande client ou dans une facture et qu’elles calculent les taxes avec AvaTax, mais le compte utilisé pour enregistrer les taxes doit être reconfiguré dans l’onglet Définition de la taxe, dans les sections Répartition pour les factures et Répartition pour les remboursements.

Produits

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

Configuration du produit.

Note

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).

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

Contacts

Avant d’utiliser l’intégration, précisez les informations suivantes sur le contact :

  1. Informations générales relatives au contact :

    • Cochez l’option Société pour un contact avec un numéro d’identification fiscale (CNPJ), ou cochez Particulier pour un contact avec un CPF.

    • Nom

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

      • In the Street field, enter the street, number, and any extra address information.

      • In the Street 2 field, enter the neighborhood.

    • Identification Number: CNPJ or CPF

    • Tax ID: associated with the identification type

    • IE : numéro d’identification fiscale de l’État

    • IM: municipal tax identification number

    • Code SUFRAMA : Numéro d’enregistrement SUFRAMA

    • Téléphone

    • Email

    Configuration du contact.

    Note

    Les champs CPF, IE, IM, et Code SUFRAMA sont masqués jusqu’à ce que le Pays soit défini sur Brésil.

  2. 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

    • Régime fiscal : régime fiscal fédéral

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

    • Secteur d’activité principal : liste des secteurs d’activité principaux du contact

    Configuration fiscale du contact.
  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.

Positions fiscales

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.

Configuration de la position fiscale

Flux de travail

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.

Avertissement

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:

  • Confirmation du devis

    Confirmez un devis en commande client.

  • Déclencheur manuel

    Cliquez sur Calculer les taxes avec AvaTax.

  • Aperçu

    Cliquez sur le bouton Aperçu.

  • Envoyer un devis / commande client par email

    Envoyez un devis ou une commande client à un client par email.

  • Accès aux devis en ligne

    When a customer accesses the quotation online (via the portal view), the API call is triggered.

Calculs des taxes sur les factures

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

  • Déclencheur manuel

    Cliquez sur Calculer les taxes avec AvaTax.

  • Aperçu

    Cliquez sur le bouton Aperçu.

  • Accès aux factures en ligne

    When a customer accesses the invoice online (via the portal view), the API call is triggered.

Note

La Position fiscale doit être définie sur Correspondance automatique de taxes (Avalara Brazil) pour que l’une de ces actions calculent automatiquement les taxes.

Documents électroniques

Factures clients

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

  • Fiscal Position set as the Automatic Tax Mapping (Avalara Brazil)

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

There are some other optional fields that depend on the nature of the transaction. These fields are not required, so no errors will appear from the government if these optional fields are not populated for most cases:

  • Freight Model determines how the goods are planned to be transported - domestic

  • Transporter Brazil determines who is doing the transportation

Invoice information needed to process an electronic invoice. Process electronic invoice pop-up in Odoo.

Note

All of the fields available on the invoice used to issue an electronic invoice are also available on the sales order, if needed. When creating the first invoice, the field Document Number is displayed, allocated as the first number to be used sequentially for subsequent invoices.

Avoirs

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.

Note

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

Pour plus d'infos

Issue a credit note

Notes de débit

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.

Note

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

Only the products included in the original invoice can be part of the debit note. While changes can be made to the product’s unit price or quantity, products cannot be added to the debit note. The purpose of this document is only to declare the amount that you want to add to the original invoice for the same or fewer products.

Pour plus d'infos

Issue a debit note

Invoice cancellation

It is possible to cancel an electronic invoice that was validated by the government.

Note

Check whether the electronic invoice is still within the cancellation deadline, which may vary according to the legislation of each state.

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.

Invoice cancellation reason in Odoo.

Note

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.

Correction letter

A correction letter can be created and linked to an electronic invoice for goods (NF-e) 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.

Correction letter reason in Odoo.

Note

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

Invalidate invoice number range

A range of sequences that are assigned to sales journals can be invalidated with the government if they are not currently used, and will not be used in the future. To do so, navigate to the journal, and click the ⚙️ (gear) icon ‣ Invalidate Number Range (BR). On the Invalidate Number Range (BR) wizard, add the Initial Number and End Number of the range that should be canceled, and enter an invalidation Reason.

Number range invalidation selection in Odoo. Number range invalidation wizard in Odoo.

Note

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

Note

The log of the canceled numbers along with the XML file are recorded in the chatter of the journal.

Factures fournisseurs

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

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