2021-01-24 20:17:14 -08:00
|
|
|
|
====
|
|
|
|
|
|
Peru
|
|
|
|
|
|
====
|
|
|
|
|
|
|
2024-02-05 12:34:22 -05:00
|
|
|
|
.. |SUNAT| replace:: :abbr:`SUNAT (Superintendencia Nacional de Aduanas y de Administración Tributaria)`
|
|
|
|
|
|
.. |GRE| replace:: :abbr:`GRE (Guía de Remisión Electrónica)`
|
|
|
|
|
|
.. |RUS| replace:: :abbr:`RUS (Régimen Único Simplificado)`
|
|
|
|
|
|
.. |EDI| replace:: :abbr:`EDI (Electronic Data Interchange)`
|
|
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Introduction
|
|
|
|
|
|
============
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
The Peruvian localization has been improved and extended, in this version the next modules are
|
2021-01-24 20:17:14 -08:00
|
|
|
|
available:
|
|
|
|
|
|
|
|
|
|
|
|
- **l10n_pe**: Adds accounting features for the Peruvian localization, which represent the minimal
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- **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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
`SUNAT EDI specifications <https://cpe.sunat.gob.pe/node/88/>`_,
|
2022-11-18 10:10:48 +00:00
|
|
|
|
that keeps track of new changes and updates.
|
|
|
|
|
|
The features of this module are based on the resolutions published on the
|
2021-01-24 20:17:14 -08:00
|
|
|
|
`SUNAT Legislation <https://www.sunat.gob.pe/legislacion/general/index.html/>`_.
|
|
|
|
|
|
|
2023-09-05 15:41:53 -04:00
|
|
|
|
.. seealso::
|
|
|
|
|
|
- `App Tour - Localización de Peru <https://youtu.be/Ic3mGovkf8Y>`_
|
2023-09-22 15:07:17 -07:00
|
|
|
|
- `Smart Tutorial - Localización de Peru <https://www.odoo.com/slides/smart-tutorial-localizacion-de-peru-133>`_
|
2023-09-05 15:41:53 -04:00
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Configuration
|
|
|
|
|
|
=============
|
|
|
|
|
|
|
|
|
|
|
|
Install the Peruvian localization modules
|
|
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Go to *Apps* and search for Peru, then click Install in the module Peru EDI. This module has a
|
2021-01-24 20:17:14 -08:00
|
|
|
|
dependency with *Peru - Accounting*. In case this last one is not installed, Odoo installs it
|
|
|
|
|
|
automatically within EDI.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-modules.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
2022-11-18 10:10:48 +00:00
|
|
|
|
:alt: The "Module" filter is set on "Peru"
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
.. note::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
When you install a database from scratch selecting Peru as country, Odoo automatically
|
2021-01-24 20:17:14 -08:00
|
|
|
|
installs the base module: Peru - Accounting.
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Configure your company
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
In addition to the basic information in the Company, we need to set Peru as the Country, this is
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Registration):
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-company.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Company data for Peru including RUC and Address type code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. tip::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
|
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
.. note::
|
|
|
|
|
|
The NIF should be set following the RUC format.
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Chart of Account
|
|
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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:
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
- Taxes
|
|
|
|
|
|
- Default Account Payable.
|
|
|
|
|
|
- Default Account Receivable
|
|
|
|
|
|
|
|
|
|
|
|
The chart of accounts for Peru is based on the most updated version of the :abbr:`PCGE (Plan
|
|
|
|
|
|
Contable General Empresarial)`, which is grouped in several categories and is compatible with NIIF
|
|
|
|
|
|
accounting.
|
|
|
|
|
|
|
2024-02-05 12:34:22 -05:00
|
|
|
|
.. _peru/accounting-settings:
|
|
|
|
|
|
|
2021-05-31 15:16:09 +02:00
|
|
|
|
Accounting Settings
|
|
|
|
|
|
-------------------
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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 :menuselection:`Accounting
|
2021-01-24 20:17:14 -08:00
|
|
|
|
--> Settings --> Peruvian Localization`.
|
|
|
|
|
|
|
|
|
|
|
|
Basic Concepts
|
|
|
|
|
|
~~~~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Here are some terms that are essential on the Peruvian localization:
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- **EDI**: Electronic Data Interchange, which in this refers to the Electronic Invoice.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
- **SUNAT**: is the organization that enforces customs and taxation in Peru.
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- **OSE**: Electronic Service Operator, `OSE SUNAT's definition
|
2021-01-24 20:17:14 -08:00
|
|
|
|
<https://cpe.sunat.gob.pe/aliados/ose#:~:text=El%20Operador%20de%20Servicios%20Electr%C3%B3nicos%20(OSE)%20es%20qui%C3%A9n%20se%20encarga,otro%20documento%20que%20se%20emita>`_.
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- **CDR**: Receipt certificate (Constancia de Recepción).
|
2021-05-05 17:56:48 -07:00
|
|
|
|
- **SOL Credentials**: Sunat Operaciones en Línea. User and password are provided by the SUNAT and
|
|
|
|
|
|
grant access to Online Operations systems.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signature Provider
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
#. Digiflow
|
|
|
|
|
|
#. SUNAT
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2022-11-18 10:10:48 +00:00
|
|
|
|
part of the service.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-IAP.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: IAP option as signature providers
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
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.
|
|
|
|
|
|
#. Send the document to the OSE, in this case, Digiflow.
|
|
|
|
|
|
#. Receive the OSE validation and CDR.
|
|
|
|
|
|
|
|
|
|
|
|
How does it work?
|
|
|
|
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
+---------+-----+
|
|
|
|
|
|
| Credits | EUR |
|
|
|
|
|
|
+=========+=====+
|
|
|
|
|
|
| 1000 | 22 |
|
|
|
|
|
|
+---------+-----+
|
|
|
|
|
|
| 5000 | 110 |
|
|
|
|
|
|
+---------+-----+
|
|
|
|
|
|
| 10,000 | 220 |
|
|
|
|
|
|
+---------+-----+
|
|
|
|
|
|
| 20,000 | 440 |
|
|
|
|
|
|
+---------+-----+
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
The credits are consumed per each document that is sent to the OSE.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
.. important::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
before sending your document to the OSE.
|
|
|
|
|
|
|
|
|
|
|
|
What do you need to do?
|
|
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- In Odoo, once your enterprise contract is activated and you start working in Production, you
|
2021-01-24 20:17:14 -08:00
|
|
|
|
need to buy credits once the first 1000 are consumed.
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- As Digiflow is the OSE used in the IAP, you need to affiliate it as the official OSE for your
|
2021-01-24 20:17:14 -08:00
|
|
|
|
company on the SUNAT website. This is a simple process. For more information, please check
|
2022-11-18 10:10:48 +00:00
|
|
|
|
`OSE Affiliation guide
|
2021-01-24 20:17:14 -08:00
|
|
|
|
<https://drive.google.com/file/d/1BkrMTZIiJyi5XI0lGMi3rbMzHddOL1pa/view?usp=sharing>`_.
|
2021-04-12 19:15:16 -07:00
|
|
|
|
- Register Digiflow as the authorized PSE, please check
|
2022-11-18 10:10:48 +00:00
|
|
|
|
`PSE Affiliation guide
|
2021-04-12 19:15:16 -07:00
|
|
|
|
<https://drive.google.com/file/d/1QZoqWvtQERpS0pqp6LcKmw7EBlm9EroU/view?usp=sharing>`_.
|
|
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Digiflow
|
|
|
|
|
|
********
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
This option can be used as an alternative, instead of using the IAP services you can send your
|
2021-01-24 20:17:14 -08:00
|
|
|
|
document validation directly to Digiflow. In this case you need to consider:
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- 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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
<https://cpe.sunat.gob.pe/informacion_general/certificados_digitales/>`_.
|
|
|
|
|
|
- Sign a service agreement directly with `Digiflow <https://www.digiflow.pe/>`_.
|
|
|
|
|
|
- Provide your SOL credentials.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-Digiflow.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Digiflow
|
|
|
|
|
|
|
|
|
|
|
|
SUNAT
|
|
|
|
|
|
*****
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
In case your company wants to sign directly with the SUNAT, it is possible to select this option
|
2021-01-24 20:17:14 -08:00
|
|
|
|
in your configuration. In this case you need to consider:
|
|
|
|
|
|
- Get the SUNAT Certification process accepted.
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- 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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
<https://cpe.sunat.gob.pe/informacion_general/certificados_digitales/>`_.
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
- Provide you SOL credentials.
|
|
|
|
|
|
|
2021-05-05 17:56:48 -07:00
|
|
|
|
.. important::
|
|
|
|
|
|
When using direct connection with the SUNAT, the SOL User must be set with the Company RUT + User
|
|
|
|
|
|
Id. Example: ``20121888549JOHNSMITH``
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
Testing environment
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Odoo provides a testing environment that can be activated before your company goes into production.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
When using the testing environment and the IAP signature, you don’t need to buy testing credits
|
2021-01-24 20:17:14 -08:00
|
|
|
|
for your transactions as all of them are validated by default.
|
|
|
|
|
|
|
|
|
|
|
|
.. tip::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
By default the databases are set to work on production, make sure to enable the testing mode
|
|
|
|
|
|
if needed.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
Certificate
|
|
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
In case you don’t use Odoo IAP, in order to generate the electronic invoice signature, a digital
|
|
|
|
|
|
certificate with the extension ``.pfx`` is required. Proceed to this section and load your file and
|
|
|
|
|
|
password.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-Certificate.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: EDI Certificate wizard
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Multicurrency
|
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
The official currency exchange rate in Peru is provided by the Bank of Peru. Odoo can connect
|
2021-01-24 20:17:14 -08:00
|
|
|
|
directly to its services and get the currency rate either automatically or manually.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-multicurrency.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Bank of Peru is displayed in Multicurrency Service option
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2022-08-04 12:45:27 +00:00
|
|
|
|
Please refer to the next section in our documentation for more information about
|
2023-05-12 10:52:05 +00:00
|
|
|
|
:doc:`multicurrencies <../accounting/get_started/multi_currency>`.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2024-02-05 12:34:22 -05:00
|
|
|
|
.. _peru/master_data:
|
|
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Configure Master data
|
|
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
|
|
Taxes
|
|
|
|
|
|
~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
As part of the localization module the taxes are created automatically with their related
|
2021-01-24 20:17:14 -08:00
|
|
|
|
financial account and electronic invoice configuration.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-taxes.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: List of default taxes
|
|
|
|
|
|
|
|
|
|
|
|
EDI Configuration
|
|
|
|
|
|
*****************
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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:
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-taxes-edi.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Taxes EDI data for Peru
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fiscal Positions
|
|
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
There are two main fiscal positions included by default when you install the Peruvian localization.
|
|
|
|
|
|
|
|
|
|
|
|
**Extranjero - Exportación**: Set this fiscal position on customers for Exportation transactions.
|
|
|
|
|
|
|
|
|
|
|
|
**Local Peru**: Set this fiscal position on local customers.
|
|
|
|
|
|
|
|
|
|
|
|
Document Types
|
|
|
|
|
|
~~~~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
is created automatically when the localization module is installed.
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
|
|
|
|
|
The information required for the document types is included by default so the user does not need
|
2021-01-24 20:17:14 -08:00
|
|
|
|
to fill anything on this view:
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-document-type.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Document Type list
|
|
|
|
|
|
|
|
|
|
|
|
.. warning::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Currently the documents supported on customer invoices are: Invoice, Boleta, Debit Note and
|
2021-01-24 20:17:14 -08:00
|
|
|
|
Credit Note.
|
|
|
|
|
|
|
|
|
|
|
|
Journals
|
|
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
When creating Sales Journals, the following information must be filled, in addition to the standard
|
|
|
|
|
|
fields on the Journals:
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Use Documents
|
2021-01-24 20:17:14 -08:00
|
|
|
|
*************
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
Electronic Data Interchange
|
|
|
|
|
|
***************************
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
This section indicates which EDI workflow is used in the invoice, for Peru we must select
|
2021-01-24 20:17:14 -08:00
|
|
|
|
“Peru UBL 2.1”.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-journal-edi.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Journal EDI field
|
|
|
|
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
By default, the value Factur-X (FR) is always displayed, make sure you can uncheck it manually.
|
|
|
|
|
|
|
|
|
|
|
|
Partner
|
|
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
Identification Type and VAT
|
|
|
|
|
|
***************************
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
the sender company and in the customer, make sure you fill in this information in your records.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-id-type.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Partner identification type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Product
|
|
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-unspc-code.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: UNSPC Code on products
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Usage and testing
|
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
|
|
Customer invoice
|
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
|
|
EDI Elements
|
|
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
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 :doc:`our page about the
|
2023-05-12 10:52:05 +00:00
|
|
|
|
invoicing process <../accounting/customer_invoices/overview>`, there are a couple of
|
2023-02-10 12:30:39 +00:00
|
|
|
|
fields required as part of the Peru EDI:
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- **Document type**: The default value is “Factura Electronica” but you can manually change the
|
|
|
|
|
|
document type if needed and select Boleta for example.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-invoice-document-type.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Invoice document type field on invoices
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- **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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-operation-type.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Invoice operation type field on invoices
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- **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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
you can manually select another one when creating the invoice.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-tax-affectation-reason.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Tax affectation reason in invoice line
|
|
|
|
|
|
|
|
|
|
|
|
Invoice validation
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
Once you check all the information in your invoice is correct, you can proceed to validate it. This
|
2022-11-18 10:10:48 +00:00
|
|
|
|
action registers the account move and triggers the Electronic invoice workflow to send it to the
|
2021-01-24 20:17:14 -08:00
|
|
|
|
OSE and the SUNAT. The following message is displayed at the top of the invoice:
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-posted-invoice.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Sending of EDI Invoice in blue
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Asynchronous means that the document is not sent automatically after the invoice has been posted.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
Electronic Invoice Status
|
|
|
|
|
|
*************************
|
|
|
|
|
|
|
2023-10-23 10:37:35 +02:00
|
|
|
|
**To be Sent**: Indicates the document is ready to be sent to the OSE, this can be
|
2022-11-18 10:10:48 +00:00
|
|
|
|
done either automatically by Odoo with a *cron* that runs every hour, or the user can send it
|
2021-01-24 20:17:14 -08:00
|
|
|
|
immediately by clicking on the button “Sent now”.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-sent-manual.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Send EDI manually
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
**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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-invoice-sent.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Message on chatter when the invoice is valid
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
.. warning::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
One credit is consumed each time that you send a document for validation, in this sense if an
|
|
|
|
|
|
error is detected on an invoice and you send it one more time, two credits are consumed in
|
2021-01-24 20:17:14 -08:00
|
|
|
|
total.
|
|
|
|
|
|
|
|
|
|
|
|
Common Errors
|
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
If a validation error is received, you have two options:
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
- In case the error is related to master data on the partner, customer or taxes, you can simply
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-errors.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: List of common errors on invoices
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
For more detail please refert to `Common errors in SUNAT
|
2021-01-24 20:17:14 -08:00
|
|
|
|
<https://www.nubefact.com/codigos-error-sunat/>`_.
|
|
|
|
|
|
|
|
|
|
|
|
Invoice PDF Report
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
After the invoice is accepted and validated by the SUNAT, the invoice PDF report can be printed.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
The report includes a QR code, indicating the invoice is a valid fiscal document.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-PDF.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Invoice PDF report
|
|
|
|
|
|
|
|
|
|
|
|
IAP Credits
|
|
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-credits-IAP.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Buying credits in the IAP
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
In the IAP service includes packages with different pricing based on the number of credits.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
The price list in the IAP is always displayed in EUR.
|
|
|
|
|
|
|
|
|
|
|
|
Special Use cases
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
2021-05-31 15:16:09 +02:00
|
|
|
|
Cancellation process
|
|
|
|
|
|
********************
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Some scenarios require an invoice cancellation, for example, when an invoice was created by mistake.
|
|
|
|
|
|
If the invoice was already sent and validated by the SUNAT, the correct way to proceed is by
|
2021-01-24 20:17:14 -08:00
|
|
|
|
clicking on the button Request Cancellation:
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-cancellation.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Request invoice cancellation button
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
In order to cancel an invoice, please provide a cancellation Reason.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
Electronic Invoice Status
|
|
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
**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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
created, as a result the next message and CDR File are logged in the chatter:
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-cancellation-cdr.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Cancellation CDR sent by the SUNAT
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
|
|
|
|
|
**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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
chatter indicating the correct Government validation.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-cancelled.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: nvoice after cancellation
|
|
|
|
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
One credit is consumed on each cancellation request.
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2021-05-31 15:16:09 +02:00
|
|
|
|
Cancellation process
|
|
|
|
|
|
********************
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
When creating exportation invoices, take into account the next considerations:
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
- The Identification type on your customer must be Foreign ID.
|
|
|
|
|
|
- Operation type in your invoice must be an Exportation one.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
- The taxes included in the invoice lines should be EXP taxes.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-exp-invoice.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Exportation invoices main data
|
|
|
|
|
|
|
|
|
|
|
|
Advance Payments
|
|
|
|
|
|
****************
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
#. 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.
|
|
|
|
|
|
#. Reconcile the Credit note with the final invoice.
|
|
|
|
|
|
#. The remaining balance on the final invoice should be paid with a regular payment transaction.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
Detraction Invoices
|
2023-02-13 15:50:13 +00:00
|
|
|
|
*******************
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
When creating invoices that is subject to Detractions, take into account the next considerations:
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
#. All the products included in the invoice must have these fields configured:
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-detraction.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Detraction fields on products
|
2022-11-18 10:10:48 +00:00
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
#. Operation type in your invoice must be ``1001``
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-detraction-invoice.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Detraction code on invoices.
|
|
|
|
|
|
|
|
|
|
|
|
Credit Notes
|
|
|
|
|
|
------------
|
|
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
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
|
2021-01-24 20:17:14 -08:00
|
|
|
|
to prove a Credit Reason selecting one of the options in the list.
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-credit-note.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Add Credit Note from invoice
|
|
|
|
|
|
|
|
|
|
|
|
.. tip::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
When creating your first credit Note, select the Credit Method: Partial Refund, this allows you
|
|
|
|
|
|
to define the credit note sequence.
|
|
|
|
|
|
|
2021-01-24 20:17:14 -08:00
|
|
|
|
By default the Credit Note is set in the document type:
|
|
|
|
|
|
|
2022-05-20 09:54:32 +00:00
|
|
|
|
.. image:: peru/peru-credit-note-document.png
|
2021-01-24 20:17:14 -08:00
|
|
|
|
:align: center
|
|
|
|
|
|
:alt: Credit Note document type
|
|
|
|
|
|
|
|
|
|
|
|
To finish the workflow please follow the instructions on :doc:`our page about Credit Notes
|
2023-05-12 10:52:05 +00:00
|
|
|
|
<../accounting/customer_invoices/credit_notes>`.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
.. note::
|
2022-11-18 10:10:48 +00:00
|
|
|
|
The EDI workflow for the Credit notes works in the same way as the invoices.
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
|
|
|
|
|
Debit Notes
|
2023-02-13 15:50:13 +00:00
|
|
|
|
-----------
|
2021-01-24 20:17:14 -08:00
|
|
|
|
|
2022-11-18 10:10:48 +00:00
|
|
|
|
As part of the Peruvian localization, besides creating credit notes from an existing document
|
2021-01-24 20:17:14 -08:00
|
|
|
|
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.
|
2024-02-05 12:34:22 -05:00
|
|
|
|
|
|
|
|
|
|
.. _peru/edg:
|
|
|
|
|
|
|
|
|
|
|
|
Electronic delivery guide 2.0
|
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
|
|
|
|
The *Guía de Remisión Electrónica* (GRE) is an electronic document generated by the shipper to
|
|
|
|
|
|
support the transportation or transfer of goods from one place to another, such as a warehouse or
|
|
|
|
|
|
establishment. In Odoo, there are several configuration steps needed before you can successfully use
|
|
|
|
|
|
this feature.
|
|
|
|
|
|
|
|
|
|
|
|
The use of the *guía de remisión electrónica* electronic document is mandatory and required by
|
|
|
|
|
|
|SUNAT| for taxpayers who need to transfer their products, except those under the *Single Simplified
|
|
|
|
|
|
Regime* (régimen único simplificado or RUS).
|
|
|
|
|
|
|
|
|
|
|
|
Delivery guide types
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
Sender
|
|
|
|
|
|
******
|
|
|
|
|
|
|
|
|
|
|
|
The *Sender* delivery guide type is issued when a sale is made, a service is rendered (including
|
|
|
|
|
|
processing), goods are assigned for use, or goods are transferred between premises of the same
|
|
|
|
|
|
company and others.
|
|
|
|
|
|
|
|
|
|
|
|
This delivery guide is issued by the owner of the goods (i.e., the sender) at the beginning of the
|
|
|
|
|
|
shipment. The sender delivery guide is supported in Odoo.
|
|
|
|
|
|
|
|
|
|
|
|
.. seealso::
|
|
|
|
|
|
`SUNAT guía de remisión <https://www.gob.pe/7899-guia-de-remision>`_
|
|
|
|
|
|
|
|
|
|
|
|
Carrier
|
|
|
|
|
|
*******
|
|
|
|
|
|
|
|
|
|
|
|
The *Carrier* delivery guide type justifies the transportation service the driver (or carrier)
|
|
|
|
|
|
performs.
|
|
|
|
|
|
|
|
|
|
|
|
This delivery guide is issued by the carrier and must be issued to each shipper when the shipment
|
|
|
|
|
|
goes through public transport.
|
|
|
|
|
|
|
|
|
|
|
|
.. important::
|
|
|
|
|
|
The carrier delivery guide is **not** supported in Odoo.
|
|
|
|
|
|
|
|
|
|
|
|
.. seealso::
|
|
|
|
|
|
`SUNAT guía de remisión transportista
|
|
|
|
|
|
<https://tefacturo.pe/blog/sunat/guia-de-remision-electronica/guia-de-remision-transportista/>`_
|
|
|
|
|
|
|
|
|
|
|
|
Transportation types
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
Private
|
|
|
|
|
|
*******
|
|
|
|
|
|
|
|
|
|
|
|
The *Private* transportation type option is used when the owner transfers goods using their own
|
|
|
|
|
|
vehicles. In this case, a sender's delivery guide must be issued.
|
|
|
|
|
|
|
|
|
|
|
|
Public
|
|
|
|
|
|
******
|
|
|
|
|
|
|
|
|
|
|
|
The *Public* transportation type option is used when an external carrier moves the goods. In
|
|
|
|
|
|
this case, two delivery guides must be issued: the sender's delivery guide and the carrier's
|
|
|
|
|
|
delivery guide.
|
|
|
|
|
|
|
|
|
|
|
|
Direct submission to SUNAT
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
The creation of the |GRE| delivery guide in Odoo **must** be sent directly to the |SUNAT|,
|
|
|
|
|
|
regardless of the electronic document provider: IAP, Digiflow, or |SUNAT|.
|
|
|
|
|
|
|
|
|
|
|
|
Required information
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
Version 2.0 of the electronic delivery guide requires additional information on the general
|
|
|
|
|
|
configuration, vehicles, contacts, and products. In the general configuration, it is necessary to
|
|
|
|
|
|
add new credentials that you can retrieve from the |SUNAT| portal.
|
|
|
|
|
|
|
|
|
|
|
|
Cancellations
|
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
**Both** the sender and the carrier can cancel the electronic waybill as long as the following
|
|
|
|
|
|
conditions are met:
|
|
|
|
|
|
|
|
|
|
|
|
- The shipment has not been initiated.
|
|
|
|
|
|
- If the shipment has been initiated, the receiver **must** be changed before reaching the final
|
|
|
|
|
|
destination.
|
|
|
|
|
|
|
|
|
|
|
|
.. important::
|
|
|
|
|
|
The |SUNAT| no longer uses the term "Anula", but now uses the term "Dar de baja" for
|
|
|
|
|
|
cancellations.
|
|
|
|
|
|
|
|
|
|
|
|
Testing
|
|
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
The |SUNAT| does not support a test environment. This means that any delivery guides that were
|
|
|
|
|
|
generated by mistake **will** be sent to the |SUNAT|.
|
|
|
|
|
|
|
|
|
|
|
|
If, by mistake, the waybill was created in this environment, it is necessary to delete it from the
|
|
|
|
|
|
|SUNAT| portal.
|
|
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
.. important::
|
|
|
|
|
|
- Electronic sender's |GRE| is currently the only supported type of waybill in Odoo.
|
|
|
|
|
|
- The delivery guide is dependent on the Odoo *Inventory* app, the :guilabel:`l10n_pe_edi` and
|
|
|
|
|
|
:guilabel:`l10n_pe` modules.
|
|
|
|
|
|
- A second user **must** be added for the creation of electronic documents.
|
|
|
|
|
|
|
|
|
|
|
|
After following the steps to configure the :ref:`electronic invoicing <peru/accounting-settings>`
|
|
|
|
|
|
and the :ref:`master data <peru/master_data>`, :ref:`install <general/install>` the
|
|
|
|
|
|
:guilabel:`Peruvian - Electronic Delivery Note 2.0` module (`l10n_pe_edi_stock_20`).
|
|
|
|
|
|
|
|
|
|
|
|
Next, you need to retrieve the *client ID* and *client secret* from |SUNAT|. To do so, follow the
|
|
|
|
|
|
`manual de servicios web plataforma nueva GRE
|
|
|
|
|
|
<https://cpe.sunat.gob.pe/sites/default/files/inline-files/Manual_Servicios_GRE.pdf>`_.
|
|
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
In the |SUNAT| portal, it is important to have the correct access rights enabled, as they may
|
|
|
|
|
|
differ from the user set for electronic invoicing.
|
|
|
|
|
|
|
|
|
|
|
|
These credentials should be used to configure the delivery guide general settings from
|
|
|
|
|
|
:menuselection:`Accounting --> Configuration --> Settings --> Peruvian Electronic Invoicing`.
|
|
|
|
|
|
|
|
|
|
|
|
.. image:: peru/gre-fields-example.png
|
|
|
|
|
|
:alt: Example for the SUNAT Delivery Guide API section configuration.
|
|
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
It is required to follow the format `RUC + UsuarioSol` (e.g., `20557912879SOLUSER`) for the
|
|
|
|
|
|
:guilabel:`Guide SOL User` field, depending on the user selected when generating the |GRE| API
|
|
|
|
|
|
credentials in the |SUNAT| portal.
|
|
|
|
|
|
|
|
|
|
|
|
Operator
|
|
|
|
|
|
********
|
|
|
|
|
|
|
|
|
|
|
|
The *operator* is the vehicle's driver in cases where the delivery guide is through *private*
|
|
|
|
|
|
transport.
|
|
|
|
|
|
|
|
|
|
|
|
To create a new operator, navigate to :menuselection:`Contacts --> Create` and fill out the contact
|
|
|
|
|
|
information.
|
|
|
|
|
|
|
|
|
|
|
|
First, select :guilabel:`Individual` as the :guilabel:`Company Type`. Then, add the
|
|
|
|
|
|
:guilabel:`Operator License` in the :guilabel:`Accounting` tab of the contact form.
|
|
|
|
|
|
|
|
|
|
|
|
For the customer address, make sure the following fields are complete:
|
|
|
|
|
|
|
|
|
|
|
|
- :guilabel:`District`
|
|
|
|
|
|
- :guilabel:`Tax ID` (:guilabel:`DNI`/:guilabel:`RUC`)
|
|
|
|
|
|
- :guilabel:`Tax ID Number`
|
|
|
|
|
|
|
|
|
|
|
|
.. image:: peru/operator-configuration.png
|
|
|
|
|
|
:alt: Individual type operator configurations in the Contact form.
|
|
|
|
|
|
|
|
|
|
|
|
Carrier
|
|
|
|
|
|
*******
|
|
|
|
|
|
|
|
|
|
|
|
The *carrier* is used when the delivery guide is through *public* transport.
|
|
|
|
|
|
|
|
|
|
|
|
To create a new carrier, navigate to :menuselection:`Contacts --> Create` and fill out the contact
|
|
|
|
|
|
information.
|
|
|
|
|
|
|
|
|
|
|
|
First, select :guilabel:`Company` as the :guilabel:`Company Type`. Then, add the :guilabel:`MTC
|
|
|
|
|
|
Registration Number`, :guilabel:`Authorization Issuing Entity`, and the :guilabel:`Authorization
|
|
|
|
|
|
Number`.
|
|
|
|
|
|
|
|
|
|
|
|
For the company address, make sure the following fields are complete:
|
|
|
|
|
|
|
|
|
|
|
|
- :guilabel:`District`
|
|
|
|
|
|
- :guilabel:`Tax ID` (:guilabel:`DNI`/:guilabel:`RUC`)
|
|
|
|
|
|
- :guilabel:`Tax ID Number`
|
|
|
|
|
|
|
|
|
|
|
|
.. image:: peru/company-operator-configuration.png
|
|
|
|
|
|
:alt: Company type operator configurations in the Contact form.
|
|
|
|
|
|
|
|
|
|
|
|
Vehicles
|
|
|
|
|
|
********
|
|
|
|
|
|
|
|
|
|
|
|
To configure the available vehicles, navigate to :menuselection:`Inventory --> Configuration -->
|
|
|
|
|
|
Vehicles` and fill in the vehicle form with the information needed for the vehicle:
|
|
|
|
|
|
|
|
|
|
|
|
- :guilabel:`Vehicle Name`
|
|
|
|
|
|
- :guilabel:`License Plate`
|
|
|
|
|
|
- :guilabel:`Is M1 or L?`
|
|
|
|
|
|
- :guilabel:`Special Authorization Issuing Entity`
|
|
|
|
|
|
- :guilabel:`Authorization Number`
|
|
|
|
|
|
- :guilabel:`Default Operator`
|
|
|
|
|
|
- :guilabel:`Company`
|
|
|
|
|
|
|
|
|
|
|
|
.. important::
|
|
|
|
|
|
It is important to check the :guilabel:`Is M1 or L?` checkbox if the vehicle has fewer than four
|
|
|
|
|
|
wheels or fewer than eight seats.
|
|
|
|
|
|
|
|
|
|
|
|
.. image:: peru/vehicle-not-m1-or-l-pe.png
|
|
|
|
|
|
:alt: Vehicle not selected as an M1 or L type with extra fields shown.
|
|
|
|
|
|
|
|
|
|
|
|
Products
|
|
|
|
|
|
********
|
|
|
|
|
|
|
|
|
|
|
|
To configure the available products, navigate to :menuselection:`Inventory --> Products` and open
|
|
|
|
|
|
the product to be configured.
|
|
|
|
|
|
|
|
|
|
|
|
Make sure that the applicable information in the product form is fully configured. The
|
|
|
|
|
|
:guilabel:`Partida Arancelaria` (Tariff Item) field needs to be completed.
|
|
|
|
|
|
|
|
|
|
|
|
Generating a GRE
|
|
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
Once the delivery from inventory is created during the sales workflow, make sure you complete the
|
|
|
|
|
|
|GRE| fields on the top-right section of the transfer form for the fields:
|
|
|
|
|
|
|
|
|
|
|
|
- :guilabel:`Transport Type`
|
|
|
|
|
|
- :guilabel:`Reason for Transfer`
|
|
|
|
|
|
- :guilabel:`Departure start date`
|
|
|
|
|
|
|
|
|
|
|
|
It is also required to complete the :guilabel:`Vehicle` and :guilabel:`Operator` fields under the
|
|
|
|
|
|
:guilabel:`Guia de Remision PE` tab.
|
|
|
|
|
|
|
|
|
|
|
|
The delivery transfer has to be marked as *Done* for the :guilabel:`Generar Guia de Remision` button
|
|
|
|
|
|
to appear on the left menu of the transfer form.
|
|
|
|
|
|
|
|
|
|
|
|
.. image:: peru/generate-gre-transferview.png
|
|
|
|
|
|
:alt: Generar Guia de Remision button on a transfer form in the Done stage.
|
|
|
|
|
|
|
|
|
|
|
|
Once the transfer form is correctly validated by |SUNAT|, the generated XML file becomes available
|
|
|
|
|
|
in the chatter. You can now print the delivery slip that shows the transfer details and the QR
|
|
|
|
|
|
code validated by |SUNAT|.
|
|
|
|
|
|
|
|
|
|
|
|
.. image:: peru/gre-delivery-slip.png
|
|
|
|
|
|
:alt: Transfer details and QR code on generated delivery slip.
|
|
|
|
|
|
|
|
|
|
|
|
Common errors
|
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
- `Diferente prefijo para productos (T001 en algunos, T002 en otros)`
|
|
|
|
|
|
|
|
|
|
|
|
At the moment, Odoo does not support the automation of prefixes for products. This can be done
|
|
|
|
|
|
manually for each product output. This can also be done for non-storable products. However, keep
|
|
|
|
|
|
in mind that there will be no traceability.
|
|
|
|
|
|
- `2325 - GrossWeightMeasure - El dato no cumple con el formato establecido "Hace falta el campo"
|
|
|
|
|
|
"Peso"" en el producto`
|
|
|
|
|
|
|
|
|
|
|
|
This error occurs when the weight on the product is set as `0.00`. To fix this, you need to cancel
|
|
|
|
|
|
the waybill and recreate it. Make sure that you fix the weight on the product before creating the
|
|
|
|
|
|
new waybill, or it will result in the same error.
|
|
|
|
|
|
- `JSONDecodeError: Expecting value: line 1 column 1 (char 0) when creating a Delivery Guide`
|
|
|
|
|
|
|
|
|
|
|
|
This error is typically generated due to SOL user issues. Verify the user's connection with the
|
|
|
|
|
|
|SUNAT|; the SOL user must be established with the company RUT + user ID. For example
|
|
|
|
|
|
`2012188549JOHNSMITH`.
|
|
|
|
|
|
- `El número de documento relacionado al traslado de mercancía no cumple con el formato establecido:
|
|
|
|
|
|
error: documento relacionado`
|
|
|
|
|
|
|
|
|
|
|
|
The *Related Document Type* and *Related Document Number* fields only apply to invoices and
|
|
|
|
|
|
receipts.
|
|
|
|
|
|
- `400 Client error: Bad Request for URL`
|
|
|
|
|
|
|
|
|
|
|
|
This error is not solvable from Odoo; it is advised you reach out to the |SUNAT| and verify the
|
|
|
|
|
|
user. It may be necessary to create a new user.
|
|
|
|
|
|
|
|
|
|
|
|
- `Invalid content was found starting with element 'cac:BuyerCustomerParty'`
|
|
|
|
|
|
|
|
|
|
|
|
This error occurs when the transfer reason is set as *other*. Please select another option.
|
|
|
|
|
|
Following to the official documentation of the |SUNAT|'s waybill guide, the transfer reasons *03
|
|
|
|
|
|
(sale with shipment to third party)* or *12 (others)* does not work in Odoo, since you should not
|
|
|
|
|
|
have an empty or blank customer.
|
|
|
|
|
|
- `Duda cliente: consumo de créditos IAP al usar GRE 2.0`
|
|
|
|
|
|
|
|
|
|
|
|
For live clients using IAP, no credit is consumed (in theory) because it does not go through the
|
|
|
|
|
|
OSE, i.e., these documents are directly sent to the |SUNAT|.
|
|
|
|
|
|
- `Errores con formato credenciales GRE 2.0 (traceback error)`
|
|
|
|
|
|
|
|
|
|
|
|
Odoo currently throws an error with a traceback instead of a message that the credentials are not
|
|
|
|
|
|
correctly configured in the database. If this occurs on your database, please verify your
|
|
|
|
|
|
credentials.
|