La localisation péruvienne a été améliorée et étendue, dans cette version les modules suivants sont disponibles :
l10n_pe: Adds accounting features for the Peruvian localization, which represent the minimal configuration required for a company to operate in Peru and under the SUNAT regulations and guidelines. The main elements included in this module are: Chart of account, taxes, document types.
l10n_pe_edi: includes all technical and functional requirements to generate and validate Electronic Invoice, based on the SUNAT specification to create and process valid electronic documents, for more technical detail you can access the SUNAT EDI specifications, that keeps track of new changes and updates. The features of this module are based on the resolutions published on the SUNAT Legislation.
Install the Peruvian localization modules¶
Go to Apps and search for Peru, then click Install in the module Peru EDI. This module has a dependency with Peru - Accounting. In case this last one is not installed, Odoo installs it automatically within EDI.
When you install a database from scratch selecting Peru as country, Odoo automatically installs the base module: Peru - Accounting.
Configurez votre société¶
In addition to the basic information in the Company, we need to set Peru as the Country, this is essential for the Electronic Invoice to work properly. The field Address Type Code represents the establishment code assigned by the SUNAT when companies register their RUC (Unique Contributor Registration):
In case the Address type code is unknown, you can set it as the default value: 0000. Be aware that if an incorrect value is entered, the Electronic invoice validation might have errors.
The NIF should be set following the RUC format.
The chart of accounts is installed by default as part of the set of data included in the localization module, the accounts are mapped automatically in:
Default Account Payable.
Default Account Receivable
The chart of accounts for Peru is based on the most updated version of the PCGE, which is grouped in several categories and is compatible with NIIF accounting.
Paramètres de la comptabilité¶
Once the modules are installed and the basic information of your company is set, you need to configure the elements required for Electronic Invoice. For this, go to.
Voici quelques termes qui sont essentiels sur la localisation péruvienne :
EDI: Electronic Data Interchange, which in this refers to the Electronic Invoice.
SUNAT : est l’organisation qui applique les douanes et la fiscalité au Pérou.
OSE: Electronic Service Operator, OSE SUNAT’s definition.
CDR: Receipt certificate (Constancia de Recepción).
SOL Credentials: Sunat Operaciones en Línea. User and password are provided by the SUNAT and grant access to Online Operations systems.
As part of the requirements for Electronic Invoice in Peru, your company needs to select a Signature Provider that will take care of the document signing process and manage the SUNAT validation response. Odoo offers three options:
IAP (Odoo In-App Purchase)
Please refer to the sections below to check the details and considerations for each option.
IAP (Odoo In-App Purchase)¶
This is the default and the suggested option, considering the digital ceritificate is included as part of the service.
What is the IAP?¶
This is a signature service offered directly by Odoo, the service takes care of the next process:
Provides the Electronic invoice Certificate, so you do not need to acquire one by yourself.
Envoyez le document à l’OSE, en l’occurrence Digiflow.
Recevoir la validation OSE et le CDR.
Comment cela fonctionne-t-il?¶
The service requires Credits in order to process your electronic documents. Odoo provides 1000 credits for free in new databases. After these credits are consumed, you need to buy a Credit Package.
The credits are consumed per each document that is sent to the OSE.
If you have a validation error and the document needs to be sent one more time, one additional credit will be charged. Therefore, it is paramount that you verify all information is correct before sending your document to the OSE.
Que devez-vous faire ?¶
In Odoo, once your enterprise contract is activated and you start working in Production, you need to buy credits once the first 1000 are consumed.
As Digiflow is the OSE used in the IAP, you need to affiliate it as the official OSE for your company on the SUNAT website. This is a simple process. For more information, please check OSE Affiliation guide.
Register Digiflow as the authorized PSE, please check PSE Affiliation guide.
This option can be used as an alternative, instead of using the IAP services you can send your document validation directly to Digiflow. In this case you need to consider:
In case your company wants to sign directly with the SUNAT, it is possible to select this option in your configuration. In this case you need to consider: - Get the SUNAT Certification process accepted.
Buy your own digital Certificate: For more detail regarding the official vendor list, and the process to acquire it, please refer to SUNAT Digital Ceritifcates.
Provide you SOL credentials.
When using direct connection with the SUNAT, the SOL User must be set with the Company RUT + User
Odoo fournit un environnement de test qui peut être activé avant que votre entreprise ne passe en production.
Lorsque vous utilisez l’environnement de test et la signature IAP, vous n’avez pas besoin d’acheter des crédits de test pour vos transactions car elles sont toutes validées par défaut.
Par défaut, les bases de données sont configurées pour fonctionner en production, assurez-vous d’activer le mode de test si nécessaire.
Si vous n’utilisez pas Odoo IAP, afin de générer la signature électronique de la facture, un certificat numérique avec l’extension
.pfx est requis. Passez à cette section et chargez votre fichier et votre mot de passe.
The official currency exchange rate in Peru is provided by the Bank of Peru. Odoo can connect directly to its services and get the currency rate either automatically or manually.
Please refer to the next section in our documentation for more information about multicurrency.
Configurez les données de base¶
Dans le cadre du module de localisation, les taxes sont créées automatiquement avec leur compte financier associé et la configuration de la facture électronique.
As part of the taxes configuration, there are three new fields required for electronic invoice, the taxes created by default have this data included, but in case you create new taxes make sure you fill in the fields:
Deux positions fiscales principales sont incluses par défaut lorsque vous installez la localisation péruvienne.
Extranjero - Exportación: Définissez cette position fiscale sur les clients pour les transactions d’exportation.
Pérou local : définissez cette position fiscale sur les clients locaux.
Types de documents¶
In some Latin American countries, including Peru, some accounting transactions like invoices and vendor bills are classified by document types, defined by the government fiscal authorities, in this case by the SUNAT.
Each document type can have a unique sequence per journal where it is assigned. As part of the localization, the Document Type includes the country on which the document is applicable;the data is created automatically when the localization module is installed.
The information required for the document types is included by default so the user does not need to fill anything on this view:
Currently the documents supported on customer invoices are: Invoice, Boleta, Debit Note and Credit Note.
When creating Sales Journals, the following information must be filled, in addition to the standard fields on the Journals:
This field is used to define if the journal uses Document Types. It is only applicable to Purchase and Sales journals, which are the ones that can be related to the different set of document types available in Peru. By default, all the sales journals created use documents.
Permutation de données électroniques¶
This section indicates which EDI workflow is used in the invoice, for Peru we must select “Peru UBL 2.1”.
By default, the value Factur-X (FR) is always displayed, make sure you can uncheck it manually.
Type d’identification et TVA¶
As part of the Peruvian localization, the identification types defined by the SUNAT are now available on the Partner form, this information is essential for most transactions either on the sender company and in the customer, make sure you fill in this information in your records.
Additional to the basic information in your products, for the Peruvian localization, the UNSPC Code on the product is a required value to be configured.
Utilisation et test¶
Once you have configured your master data, the invoices can be created from your sales order or manually. Additional to the basic invoice information described on our page about the invoicing process, there are a couple of fields required as part of the Peru EDI:
Document type: The default value is “Factura Electronica” but you can manually change the document type if needed and select Boleta for example.
Operation type: This value is required for Electronic Invoice and indicates the transaction type, the default value is “Internal Sale” but another value can be selected manually when needed, for example Export of Goods.
EDI Affectation Reason: In the invoice lines, additional to the Tax there is a field “EDI Affectation Reason” that determines the tax scope based on the SUNAT list that is displayed. All the taxes loaded by default are associated with a default EDI affection reason, if needed you can manually select another one when creating the invoice.
Validation des factures¶
Une fois que vous avez vérifié que toutes les informations de votre facture sont correctes, vous pouvez procéder à sa validation. Cette action enregistre le transfert de compte et déclenche le flux de facturation électronique pour l’envoyer à l’OSE et au SUNAT. Le message suivant s’affiche en haut de la facture :
Asynchronous means that the document is not sent automatically after the invoice has been posted.
Electronic Invoice Status¶
To be Sent: To be sent: Indicates the document is ready to be sent to the OSE, this can be done either automatically by Odoo with a cron that runs every hour, or the user can send it immediately by clicking on the button “Sent now”.
Sent: Indicates the document was sent to the OSE and was successfully validated. As part of the validation a ZIP file is downloaded and a message is logged in the chatter indicating the correct Government validation.
In case there is a validation error the Electronic Invoice status remains in “To be sent” so the corrections can be made and the invoice can be sent again.
Un crédit est consommé à chaque fois que vous envoyez un document en validation, en ce sens si une erreur est détectée sur une facture et que vous l’envoyez une fois de plus, deux crédits sont consommés au total.
There are multiple reasons behind a rejection from the OSE or the SUNAT, when this happens Odoo sends a message at the top of the invoice indicating the error details and in the most common cases a hint to fix the issue.
If a validation error is received, you have two options:
In case the error is related to master data on the partner, customer or taxes, you can simply apply the change on the record (example customer identification type) and once it is done click on the Retry button.
If the error is related to some data recorded on the invoice directly (Operation type, missing data on the invoice lines), the correct solution is to reset the invoice to Draft, apply the changes, and then send the invoice again to the SUNAT for another validation.
Pour plus de détails, veuillez consulter Erreurs courantes dans SUNAT.
Invoice PDF Report¶
After the invoice is accepted and validated by the SUNAT, the invoice PDF report can be printed. The report includes a QR code, indicating the invoice is a valid fiscal document.
Odoo’s Electronic IAP offers 1000 credits for free, after these credits are consumed in your production database, your company must buy new credits in order to process your transactions.
Once you run out of credits a red label is displayed at the top of the invoice indicating that additional credits are required, you can easily buy them by accessing the link provided in the message.
In the IAP service includes packages with different pricing based on the number of credits. The price list in the IAP is always displayed in EUR.
Special Use cases¶
Certains scénarios nécessitent une annulation de facture, par exemple lorsqu’une facture a été créée par erreur. Si la facture a déjà été envoyée et validée par le SUNAT, la bonne façon de procéder est de cliquer sur le bouton Demande d’annulation :
In order to cancel an invoice, please provide a cancellation Reason.
Electronic Invoice Status¶
To Cancel: Indicates the cancellation request is ready to be sent to the OSE, this can be done either automatically by Odoo with a cron that runs every hour, or the user can send it immediately by clicking on the button “Send now”. Once it is sent, a cancellation ticket is created, as a result the next message and CDR File are logged in the chatter:
Cancelled: Indicates the cancellation request was sent to the OSE and was successfully validated. As part of the validation a ZIP file is downloaded and a message is logged in the chatter indicating the correct Government validation.
One credit is consumed on each cancellation request.
When creating exportation invoices, take into account the next considerations:
The Identification type on your customer must be Foreign ID.
Le type d’opération dans votre facture doit être Exportation.
The taxes included in the invoice lines should be EXP taxes.
Create the advance payment Invoice and apply its related payment.
Create the final invoice without considering the advance payment.
Create a credit note for the Final invoice with the advance payment amount.
Rapprochez l’avoir avec la facture finale.
The remaining balance on the final invoice should be paid with a regular payment transaction.
When creating invoices that is subject to Detractions, take into account the next considerations:
All the products included in the invoice must have these fields configured:
Operation type in your invoice must be
When a correction or refund is needed over a validated invoice, a credit note must be generated, for this just click on the button “Add Credit Note”, a part of the Peruvian localization you need to prove a Credit Reason selecting one of the options in the list.
When creating your first credit Note, select the Credit Method: Partial Refund, this allows you to define the credit note sequence.
By default the Credit Note is set in the document type:
Pour terminer le flux de travail, veuillez suivre les instructions sur notre page sur les avoirs.
The EDI workflow for the Credit notes works in the same way as the invoices.
Notes de débit¶
As part of the Peruvian localization, besides creating credit notes from an existing document you can also create debit Notes. For this just use the button “Add Debit Note”.
By default the Debit Note is set in the document type.