秘鲁¶
模块¶
Install the following modules to utilize all the current features of the Peruvian localization.
名称 |
技术名称 |
描述 |
---|---|---|
Peru - Accounting |
|
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 the chart of accounts, taxes, document types. |
Peru - E-invoicing |
|
Includes all technical and functional requirements to generate and receive electronic invoices online based on the SUNAT regulations. |
Peru - Accounting Reports |
|
Includes the following financial reports:
|
Peruvian - Electronic Delivery Note |
|
Adds the delivery guide (Guía de Remisión), which is needed as proof that you are sending goods between A and B. It is only when a delivery order is validated that the delivery guide can be created. |
Peruvian eCommerce |
|
Enables the identification type in eCommerce checkout forms and the ability to generate electronic invoices. |
Peruvian - Point of Sale with PE Doc |
|
Enables contact fiscal information to be editable from a PoS Session to generate electronic invoices and refunds. |
注解
Odoo会根据在创建数据库时选择的国家自动安装适合您公司的适当软件包。
The Peruvian - Electronic Delivery Guide module depends on the Inventory application to be installed.
配置¶
安装秘鲁本地化模块¶
转到 应用 并搜索 Peru,然后在模块 Peru EDI 上点击安装。此模块依赖于 Peru - Accounting。如果此模块未安装,Odoo 会自动在 EDI 中安装。
注解
当您选择秘鲁作为国家安装数据库时,Odoo会自动安装基础模块:秘鲁 - 会计。
配置您的公司¶
除了公司的基本信息外,我们需要将秘鲁设置为国家,这对于电子发票的正常工作至关重要。字段 地址类型代码 表示SUNAT在公司注册其RUC(唯一贡献者注册)时分配的机构代码:
小技巧
如果地址类型代码未知,您可以将其设置为默认值:0000。请注意,如果输入了不正确的值,则电子发票验证可能会出现错误。
注解
NIF应按照RUC格式设置。
科目表¶
默认情况下,会安装账户表作为本地化模块中包含的数据集的一部分,账户会自动映射到以下位置:
税费
默认应付账户。
默认应收账款账户
秘鲁的账户表基于最新版本的 PCGE ,它分为几个类别,并与NIIF会计兼容。
会计设置¶
一旦安装了模块并设置了公司的基本信息,您需要配置所需的电子发票元素。为此,请转到:
。基本概念¶
以下是秘鲁本地化中必不可少的一些术语:
EDI: 电子数据交换,这里指的是电子发票。
SUNAT:是负责执行秘鲁的海关和税收的组织。
OSE: 电子服务运营商, OSE SUNAT’s 定义.
CDR:收据证明(Constancia de Recepción)。
SOL凭证:Sunat Operaciones en Línea。用户和密码由SUNAT提供,并授予对在线操作系统的访问权限。
签名提供者¶
作为秘鲁电子发票的要求之一,您的公司需要选择一个签名提供商来处理文档签名过程并管理SUNAT验证响应。Odoo提供了三个选项:
IAP(Odoo应用内购买)
迪吉流
国家税务总局
请参考下面的章节,以检查每个选项的详细信息和注意事项。
IAP(Odoo应用内购买)¶
这是默认和建议的选项,考虑到数字证书已经作为服务的一部分包含在内。
什么是IAP?¶
这是Odoo直接提供的签名服务,该服务负责以下过程:
提供电子发票证书,您无需自行获取。
将文档发送给 OSE,在本例中为 Digiflow。
接收 OSE 验证和 CDR。
它是如何工作的?¶
该服务需要信用点才能处理您的电子文档。Odoo在新数据库中提供1000个免费信用点。使用完这些信用点后,您需要购买信用点套餐。
信用 |
欧元 |
---|---|
1000 |
22 |
5000 |
110 |
10,000 |
220 |
20,000 |
440 |
每发送一份文件到 OSE,就会消耗一定数量的信用点数。
重要
如果您遇到验证错误,需要再次发送文件,则会收取额外的信用点。因此,在将文件发送给 OSE 之前,请务必验证所有信息是否正确。
你需要做什么?¶
在Odoo中,一旦您的企业合同被激活并开始生产,您需要在消耗前1000个信用点后购买信用点。
由于Digiflow是IAP中使用的OSE,您需要在SUNAT网站上将其作为您公司的官方OSE进行关联。这是一个简单的过程。有关更多信息,请查看 OSE关联指南。
将Digiflow注册为授权的PSE,请查看 PSE Affiliation guide.
迪吉流¶
您可以使用此选项作为替代方案,而不是使用IAP服务,您可以直接将您的文档验证发送到Digiflow。在这种情况下,您需要考虑以下事项:
购买您自己的数字证书:有关官方供应商列表的详细信息和获取过程,请参阅 SUNAT 数字证书。
与 Digiflow 直接签订服务协议。
提供您的SOL凭据。
国家税务总局¶
如果您的公司想直接与SUNAT签署协议,您可以在配置中选择此选项。在这种情况下,您需要考虑:-获得SUNAT认证过程的批准。
购买您自己的数字证书:有关官方供应商列表的详细信息和获取过程,请参阅 SUNAT 数字证书。
提供您的SOL凭据。
重要
当使用与SUNAT的直接连接时,SOL用户必须设置为公司RUT +用户ID。示例: 20121888549JOHNSMITH
测试环境¶
Odoo提供了一个测试环境,可以在您的公司进入生产之前激活。
当使用测试环境和IAP签名时,您不需要购买测试信用额度来验证您的交易,因为它们都是默认验证的。
小技巧
默认情况下,数据库设置为在生产环境下工作,请确保如有需要启用测试模式。
证书¶
如果您不使用Odoo IAP,则需要一个扩展名为 .pfx
的数字证书来生成电子发票签名。请前往此部分加载您的文件和密码。
多币种¶
The official currency exchange rate in Peru is provided by the SUNAT. Odoo can connect directly to its services and get the currency rate either automatically or manually.
请参考我们文档中的下一节,了解更多关于 多货币 的信息。
配置主数据¶
税费¶
作为本地化模块的一部分,税收会自动创建,并配置其相关的财务账户和电子发票。
EDI 配置¶
作为税收配置的一部分,电子发票需要三个新字段,由默认创建的税收已包含这些数据,但如果您创建新的税收,请确保填写这些字段:
税务位置¶
在安装秘鲁本地化时,默认包含两个主要的财务职位。
Extranjero - Exportación: 将此财务位置设置为客户的出口交易。
本地秘鲁:将此财务位置设置为本地客户。
文件类型¶
在一些拉丁美洲国家,包括秘鲁,在政府财政机构(在这种情况下是SUNAT)定义的文档类型中,一些会计交易,如发票和供应商账单被分类。
每种文档类型可以在其分配的日记帐中拥有唯一的序列。作为本地化的一部分,文档类型包括适用于文档的国家;当本地化模块安装时,数据会自动创建。
文档类型所需的信息已默认包含在内,因此用户无需在此视图中填写任何内容:
警告
目前客户发票支持的文档类型有:发票、Boleta、借记通知单和贷记通知单。
日记账¶
创建销售日记账时,除了日记账上的标准字段外,还必须填写以下信息:
使用文档¶
该字段用于定义日志是否使用文档类型。它仅适用于采购和销售日志,这些日志可以与秘鲁提供的不同文档类型集相关联。默认情况下,所有创建的销售日志都使用文档。
电子数据交换¶
This section indicates which EDI workflow is used in the invoice, for Peru we must select “Peru UBL 2.1”.
警告
默认情况下,始终显示Factur-X(FR)值,请确保您可以手动取消选中它。
合作伙伴¶
身份证类型和增值税¶
作为秘鲁本地化的一部分,SUNAT定义的身份证类型现在可以在合作伙伴表单上使用,这些信息对于大多数发件公司和客户的交易至关重要,请确保在您的记录中填写这些信息。
产品¶
除了产品的基本信息外,在秘鲁本地化中,产品的UNSPC代码是必须配置的值。
使用和测试¶
客户发票¶
EDI元素¶
一旦您配置好主数据,发票可以从销售订单或手动创建。除了基本发票信息外,还需要一些字段作为秘鲁EDI的一部分,有关发票流程的详细信息请参阅: 有关发票流程的页面。
文档类型:默认值为“Factura Electronica”,但如果需要,您可以手动更改文档类型并选择Boleta,例如。
操作类型:此值在电子发票中是必需的,表示交易类型,默认值为“内部销售”,但在需要时可以手动选择其他值,例如货物出口。
EDI Affectation Reason: 在发票行中,除了税金之外,还有一个“EDI Affectation Reason”字段,该字段根据显示的SUNAT列表确定税收范围。默认加载的所有税收都与默认的EDI影响原因相关联,如果需要,您可以在创建发票时手动选择其他原因。
发票验证¶
确认发票信息无误后,您可以进行验证。此操作将注册账户移动并触发电子发票工作流程,将其发送到OSE和SUNAT。以下消息将显示在发票顶部:
异步意味着发票发布后文档不会自动发送。
电子发票状态¶
待发送:待发送:表示文档已准备好发送给 OSE,可以通过 Odoo 的 cron 每小时自动发送,或者用户可以立即点击“立即发送”按钮发送。
已发送:表示文档已发送到 OSE 并成功验证。作为验证的一部分,将下载一个 ZIP 文件,并在聊天中记录一条消息,指示正确的政府验证。
如果存在验证错误,则电子发票状态仍为“待发送”,以便进行更正并重新发送发票。
警告
每次发送文档进行验证时,将消耗一个信用点。如果在发票上检测到错误并再次发送它,则总共将消耗两个信用点。
常见错误¶
当 OSE 或 SUNAT 拒绝时,有多种原因,此时 Odoo 会在发票顶部发送一条消息,指示错误详细信息,并在大多数常见情况下提供修复问题的提示。
如果收到验证错误,您有两个选项:
如果错误与合作伙伴、客户或税收的主数据有关,则可以在记录上应用更改(例如客户身份证类型),完成后单击“重试”按钮。
如果错误与发票直接记录的某些数据有关(操作类型,发票行缺少数据),正确的解决方案是将发票重置为草稿状态,应用更改,然后再次将发票发送给SUNAT进行另一次验证。
更多详细信息,请参考 Common errors in SUNAT。
发票 PDF 报告¶
在发票被SUNAT接受和验证后,可以打印发票PDF报告。该报告包括一个QR码,表示该发票是有效的财务文件。
IAP积分¶
Odoo的电子IAP提供1000个免费积分,当这些积分在您的生产数据库中用尽后,您的公司必须购买新的积分才能处理您的交易。
当您的信用额度用尽时,发票顶部会显示一个红色标签,指示需要额外的信用额度,您可以通过访问消息中提供的链接轻松购买它们。
IAP服务包括不同价格的套餐,基于信用点数。IAP中的价格列表始终以欧元显示。
特殊用例¶
取消流程¶
有些情况需要取消发票,例如,当发票被错误地创建时。如果发票已经被发送并由SUNAT验证,正确的操作方式是点击“请求取消”按钮:
为了取消发票,请提供取消原因。
电子发票状态¶
取消: 表示取消请求已准备好发送给 OSE,这可以通过 Odoo 自动使用 cron 每小时运行,或者用户可以立即点击“立即发送”按钮发送。一旦发送,将创建一个取消票据,结果是下一条消息和 CDR 文件将记录在聊天中:
已取消:表示取消请求已发送到 OSE 并成功验证。作为验证的一部分,将下载一个 ZIP 文件,并在聊天中记录一条消息,指示正确的政府验证。
警告
每个作废请求将消耗一个信用点。
Export invoices¶
创建出口发票时,请考虑以下事项:
您客户的身份证明类型必须为外国身份证。
发票中的操作类型必须是出口类型。
发票行中包含的税金应为出口税。
预付款¶
创建预付款发票并应用其相关付款。
创建最终发票时不考虑预付款。
创建一张贷项通知单,金额为预付款金额,针对最终发票。
将贷项通知单与最终发票进行对账。
最后一张发票上的剩余余额应该使用常规支付交易进行支付。
扣款发票¶
创建需要扣除的发票时,请考虑以下事项:
发票中包含的所有产品必须配置这些字段:
发票中的操作类型必须为
1001
贷项通知单¶
当需要对已验证的发票进行更正或退款时,必须生成贷项通知单,只需单击“添加贷项通知单”按钮,作为秘鲁本地化的一部分,您需要从列表中选择一个信贷原因。
小技巧
创建第一张贷项通知单时,请选择贷项方法:部分退款,这样可以定义贷项通知单序列。
默认情况下,贷项通知单设置在文档类型中:
要完成工作流,请按照 我们的页面关于信用票据的说明 进行操作。
注解
贷项通知单的EDI工作流程与发票相同。
借记通知单¶
作为秘鲁本地化的一部分,除了从现有文档创建贷记通知外,您还可以创建借记通知。只需使用“添加借记通知”按钮即可。
默认情况下,借记通知单已在文档类型中设置。
正在打印交货指南PDF文件¶
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).
送货指南¶
发送者¶
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.
承运人¶
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.
重要
The carrier delivery guide is not supported in Odoo.
交通津贴¶
私人的¶
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.
公共¶
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.
向英国税务局定期提交¶
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.
更多信息¶
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.
EDI 取消¶
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.
重要
The SUNAT no longer uses the term “Anula”, but now uses the term “Dar de baja” for cancellations.
测试¶
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.
配置¶
重要
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 l10n_pe_edi and l10n_pe modules.
A second user must be added for the creation of electronic documents.
After following the steps to configure the electronic invoicing
and the master data, install the
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.
注解
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.
如果您是简化制度,您需要在
下配置ICMS税率。注解
It is required to follow the format RUC + UsuarioSol
(e.g., 20557912879SOLUSER
) for the
Guide SOL User field, depending on the user selected when generating the GRE API
credentials in the SUNAT portal.
操作员¶
The operator is the vehicle’s driver in cases where the delivery guide is through private transport.
To create a new operator, navigate to
and fill out the contact information.First, select Individual as the Company Type. Then, add the Operator License in the Accounting tab of the contact form.
无论账单是手动创建还是自动创建,请确保以下字段已适当填写:
打印;
Tax ID (DNI/RUC)
税名:
承运人¶
The carrier is used when the delivery guide is through public transport.
To create a new carrier, navigate to
and fill out the contact information.First, select Company as the Company Type. Then, add the MTC Registration Number, Authorization Issuing Entity, and the Authorization Number.
无论账单是手动创建还是自动创建,请确保以下字段已适当填写:
打印;
Tax ID (DNI/RUC)
税名:
车辆¶
要重新排序序列,请转到
,然后拖放带有税收名称旁边的手柄的行。中间名
姓氏
短信;
厄瓜多尔会计EDI
身份证号码
默认代扣税
Company
重要
It is important to check the Is M1 or L? checkbox if the vehicle has fewer than four wheels or fewer than eight seats.
产品¶
To configure the available products, navigate to
and open the product to be configured.Make sure that the applicable information in the product form is fully configured. The 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:
纳税人类型
姓氏
姓氏
It is also required to complete the Vehicle and Operator fields under the Guia de Remision PE tab.
The delivery transfer has to be marked as Done for the Generar Guia de Remision button to appear on the left menu of the transfer form.
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.
常见错误¶
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.
eCommerce electronic invoicing¶
First, install the Peruvian eCommerce (l10n_pe_website_sale
) module.
The Peruvian eCommerce module enables the features and configurations to:
allow clients to create online accounts for eCommerce purposes;
support required fiscal fields in the eCommerce application;
receive payments for sales orders online;
generate electronic documents from the eCommerce application.
注解
The Peruvian eCommerce module is dependent on the previous installation of the Invoicing or Accounting app, as well as the Website app.
配置¶
After configuring the Peruvian electronic invoicing flow, complete the following configurations for the eCommerce flow:
产品: Set the Invoicing Policy to Ordered quantities and define the desired Customer taxes.
在线支付;
运输方式: For each shipping method, set the Provider field to Fixed Price. Then, set a Fixed Price amount greater than
0.00
(not zero), as the shipping method price is added to the invoice line.
注解
Mercado Pago is an online payment provider supported in Odoo that covers several countries, currencies, and payment methods in Latin America.
Make sure to define a Sales Price on the Delivery Product of the shipping method to prevent errors when validating the invoice with SUNAT.
To offer free delivery, manually remove the Delivery Product, or at least use
$0.01
(one cent) for the invoice to be validated with SUNAT.
Invoicing flow for eCommerce¶
Once the configurations are all set, fiscal input fields will be available during the checkout process for signed-in customers.
When customers enter their fiscal data at checkout and complete a successful purchase, the invoice is generated with the corresponding EDI elements. The document type (Boleta/Factura) is selected based on their tax ID (RUC/DNI). The invoice must then be sent to the OSE and the SUNAT. By default, all published invoices are sent once a day through a scheduled action, but you can also send each invoice manually if needed.
Once the invoice is validated with SUNAT, customers can download the .zip
with the CDR,
XML, and PDF files directly from the customer portal by clicking the Download button.