Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. EDI
  3. Electronic Invoicing Peru v 19.0
  4. Sales Conditions FAQ

Electronic Invoicing Peru

by Ganemo https://www.ganemo.co
Odoo

$ 560.23

In-App Purchases
v 19.0 Third Party
This module requires Odoo Enterprise Edition.
Live Preview
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
• Contacts (contacts)
Community Apps Dependencies Show
• Account Invoice Extras
• Catálogos SUNAT
• Origen de Documentos Rectificados
• Payment term lines
• Document Type Validation
• Peruvian Localization Menu
Lines of code 3315
Technical Name l10n_pe_edocument
LicenseOPL-1
Websitehttps://www.ganemo.co
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
• Contacts (contacts)
Community Apps Dependencies Show
• Account Invoice Extras
• Catálogos SUNAT
• Origen de Documentos Rectificados
• Payment term lines
• Document Type Validation
• Peruvian Localization Menu
Lines of code 3315
Technical Name l10n_pe_edocument
LicenseOPL-1
Websitehttps://www.ganemo.co
  • Description
  • License

Technical Specification for AI & LLM

This Odoo module 'l10n_pe_edocument' implements advanced Electronic Invoicing for Peru. It extends the standard l10n_pe_edi capabilities to support OSE providers (Digiflow) and complex tax scenarios. Key features: - Correction Credit Notes (Type 13): Allows correcting payment terms and amounts without cancelling the invoice. - Advanced Tax Logic: Handles 'Gratuita' (Free) and 'Bonificaciones' (Bonus) operations correctly in XML. - SPOT/Detractions: Automates detraction calculation and inclusion in XML based on product/payment terms. - Error Handling: Captures SUNAT/OSE XML errors and attaches them as ZIP files for easier debugging. Compatible with Odoo 19 (Enterprise, Odoo.SH, Ganemo Online). Multi-language support for English and Spanish included.

Enterprise (Odoo.SH, Ganemo Online or Ganemo.SH)
English & Spanish Included

Electronic Invoicing

Advanced OSE/SUNAT Integration & Correction

Complete your Peruvian compliance with robust OSE connectivity, automated Detractions (SPOT), and advanced Credit Note handling.

What We're Solving

----------------

Why is this module indispensable over the native l10n_pe_edi?

While the native Odoo module provides the standard UBL 2.1 base, l10n_pe_edocument bridges critical operational gaps required for real-world Peruvian compliance:

  • Type 13 Credit Notes: The native module forces standard refunds. This module "hacks" the XML to allow correcting payment terms/amounts (setting totals to 0.00) without annulling the invoice, a specific SUNAT requirement.
  • OSE Connectivity: Adds specific SOAP connection logic for OSE providers like Digiflow or Nubefact and captures XML errors as ZIP attachments for instant debugging.
  • Advanced Tax Logic: Overrides tax calculation to correctly handle "Bonificaciones" (Free items) and "Gratuitas" without incorrectly inflating the Payable Amount.

Correction Credit Notes (Type 13)

Fix payment terms or amounts without annulling the invoice. Supports the specific Type 13 Credit Note logic required by SUNAT for correcting pending payment amounts.

Robust OSE Connectivity

Enhanced connection stability with OSE providers (Digiflow). Captures and attaches XML errors returned by SUNAT/OSE as ZIP files, making debugging instant.

Advanced Tax Logic

Handles complex tax scenarios automatically: Gratuita/Bonificaciones (Free/Bonus items) and multiple taxes per line, ensuring XML compliance.

Automated SPOT (Detractions)

Automatically validates and includes SPOT (Detraction) information in the XML when payment terms or products require it, preventing common rejection errors.

Setup & User Manual

Enterprise Implementation Guide

1. General Configuration (Admin)

1.1 Electronic Invoicing Provider (OSE/PSE)

Configure your connection to SUNAT or your OSE provider (Digiflow, Nubefact, etc.).

  • Navigate to Accounting > Configuration > Settings.
  • Locate the Peruvian Electronic Invoicing section.
  • Provider: Select your service provider (e.g., 'Digiflow').
  • Environment: Set to 'Test' for staging or 'Production' for live.
  • Credentials: Enter the User and Password provided by your OSE (SOL User).
  • Certificate: Upload your digital certificate (.pfx or .pem).
1.2 Journal Configuration

Ensure your Sales Journals are ready for electronic emission.

  • Go to Accounting > Configuration > Journals.
  • Open your 'Customer Invoices' journal.
  • Under 'Advanced Settings', enable "Use Electronic Invoicing".
  • Electronic Documents: Configure the series (e.g., F001 for Invoices, B001 for Boletas).

2. Master Data Setup

2.1 Product Configuration (SPOT)

Required for Detractions automation.

  • Go to Product form > 'Accounting' tab.
  • Set the Detraction Code (e.g., '037' for Maintenance).
  • Set the Detraction Percentage (e.g., 10%).
2.2 Partner Requirements

Avoid rejection errors.

  • Identification Type: Must be 'RUC' (6) or 'DNI' (1).
  • Address: District, Province, and Department are mandatory.
  • Responsibility: Set correctly (e.g., 'Agente de Retención').

3. Operational Workflow

A. Issuing an Invoice with Detraction
  1. Create a new Invoice. Select a Partner with RUC.
  2. Add a service product configured with a Detraction Code (Set up in step 2.1).
  3. If the total amount exceeds 700.00 PEN, the system will automatically:
    • Display a "Subject to Detraction" banner.
    • Add the specific payment term "Detracciones".
    • Inject the detraction metadata into the XML.
  4. Confirm the invoice to sign and send it to OSE.
B. Correcting with Credit Note Type 13

Use this to correct payment dates or amounts without annulling the operation.

  1. Open the Posted Invoice.
  2. Click "Add Credit Note".
  3. Reason Code: Select "13 - Correccion monto neto pendiente de pago".
  4. Verify that the refund type is "Credit Note".
  5. Post. The generated document will have 0.00 total but will update the payment installments in SUNAT's records.
C. Free Transfer / Bonus Items
  1. In the invoice line, set the Discount to 100%.
  2. Or, select a tax marked as "Gratuita" (Transferencia Gratuita).
  3. The system will automatically assign the "GRA" pricing reference codes in the XML.
  4. The line amount will not be added to the Payable Total.

Global Ready | Multi-Language Support

This module is fully translated into English and Spanish (en_US, es_ES, es_PE, es_MX), ensuring a professional experience for international organizations.

English Spanish

Why Choose Ganemo?

----------------

Ganemo is the world's leading Odoo App developer and a multi-award-winning Gold Partner. For over 5 years, we have been recognized as the #1 seller of high-quality apps on the Odoo App Store. Trusted as the "Best Partner" in USA, Mexico, Chile, Spain, Colombia, Ecuador, and Peru, we deliver robust, secure, and localization-compliant solutions for global businesses.

Get a Quote & Resolve Commercial Doubts

Join thousands of satisfied clients on Odoo. Contact our sales team directly.

QR WhatsApp

Official WhatsApp

Fastest response time.

COPY
LINK
https://wa.me/18286726150

+1 (828) 672-6150

QR Sales Email

Sales Email

For commercial inquiries.

COPY
ADDR
leads@ganemo.com

leads@ganemo.com

QR Book Demo

Book a Demo

Let's explore your needs.

COPY
LINK
ganemo.co/appointment/5

Schedule Meeting

Need More? We Do It All

Professional Odoo Services

ERP Implementation

Transform your business with a full Odoo implementation. We analyze, configure, and train your team to maximize productivity. From Accounting to Inventory, we handle the complexity so you can focus on growth.

Module Dev & Migration

Need a custom feature? Or stuck on an older version? We develop high-performance custom modules and migrate your existing code to Odoo 19 with zero data loss. Expert developers at your service.

QA / Enterprise Testing Plan

Validating Critical Peruvian Flows

Scenario 1: Mixed Tax Operations (Taxable + Free)

Goal: Verify that adding a "Bonificación" line doesn't inflate the Payable Amount.

  1. Create an Invoice with two lines:
    • Line A: Service 1000 PEN (IGV 18%).
    • Line B: Product "Bonus" 1 Qty, Price 500 PEN, Discount 100% (or Tax "Gratuita").
  2. Verify: Total Tax should be 180 PEN. Total Amount to Pay should be 1180 PEN (Not 1680 or 1770).
  3. Post and check XML: Line B must have cbc:PriceAmount as 0 or reference pricing code "02" (Gratuita).

Scenario 2: Detraction + Retention Agent

Goal: Validate coexistence of multiple fiscal obligations.

  1. Configure Partner as "Retention Agent".
  2. Create Invoice > 700 PEN with Detraction Service.
  3. Verify: The system should apply Detraction logic (Payment Term) AND potentially calculate Retention if applicable by local logic (though normally Detraction takes precedence for deposit).
  4. Result: XML cac:PaymentTerms must clearly state the Detraction amount.

Scenario 3: Correction of Payment Terms (Type 13)

Goal: Confirm non-financial correction in SUNAT.

  1. Issued Invoice F001-100 pending payment.
  2. Issue Credit Note. Reason: "13 - Corrección monto neto...".
  3. Verify: The generated Credit Note has "Total" = 0.00 in Odoo view (or effectively 0 payable).
  4. XML Check: cbc:PayableAmount is 0.00. cac:BillingReference points to F001-100. New Payment Terms are present.

Scenario 4: Detraction in Foreign Currency (USD)

Goal: Validate Exchange Rate application for Spot.

  1. Create Invoice in USD. Amount $500 (approx 1900 PEN). Service with Detraction.
  2. Verify: Detraction Amount in XML must be in PEN using the official exchange rate of the day.
  3. Result: Odoo calculates (Amount USD * Rate) * Detraction %.

Scenario 5: Debit Note (Interest/Penalty)

Goal: Increase debt on existing invoice.

  1. Open Paid/Posted Invoice. click "Add Debit Note".
  2. Reason: "03 - Penalidad...". Amount: 100 PEN.
  3. Post.
  4. Verify: Document Series starts with "D" (e.g., FD01-1). References original invoice.

Scenario 6: Rejection Handling

Goal: Test the ZIP error attachment.

  1. Force an invalid condition (e.g., set Partner ID Type to "Foreign" but use a RUC format value, or disable the certificate).
  2. Send to SUNAT.
  3. Verify: Chatter should show a red message AND an attachment named R-....zip.
  4. Download ZIP and confirm it contains the CDR (Application Response) with the error description.

FAQ & Troubleshooting

Common Resolutions

Error: "L10NPE12 - Connection failed"

Reason: Odoo cannot reach the OSE/SUNAT server.

Fix: 1. Check your internet connection.
2. Verify that the OSE/SUNAT service is up (consult your provider).
3. Ensure your Firewall allows outbound traffic to the OSE URL.

Error 2024: "RUC not active/habido"

Reason: The customer's RUC is not active in SUNAT.

Fix: Verify the RUC status on the SUNAT portal. You cannot issue invoices to inactive RUCs. Change the document type to "Boleta" if the client allows, or correct the partner.

Error: "Catalog 51" (Detraction)

Reason: Mismatch between Operation Type and Detraction Code.

Fix: Ensure that if you select a Detraction Operation Type (e.g., 1001), the product has a valid Detraction Code (e.g., 037) configured in the Accounting tab.

Why is my Credit Note Amount 0?

Answer: It's a Type 13 Credit Note.

Detail: This is the correct behavior for correcting payment terms. It signals SUNAT to update the installments without refunding the money. Do not change it manually.

How do I setup Digiflow/Nubefact?

Reason: Third-party OSE configuration.

Fix: Select the provider in Settings. You must enter the specific User and Password provided by them (often different from your SOL key).

Error: "Certificate Expired"

Reason: Digital certificate validity ended.

Fix: Upload a new .pfx/.pem file in Settings. No server restart required.

Commercial & Sales

For inquiries about licenses, demos, or partnerships.

QR WhatsApp
Official WhatsApp

Fastest response time.

COPY
LINK
https://wa.me/18286726150

+1 (828) 672-6150

QR Sales Email
Sales Email

For commercial inquiries.

COPY
ADDR
leads@ganemo.com
QR Book Demo
Book a Demo

Let's explore your needs.

COPY
LINK
ganemo.co/appointment/5

Technical Support

Existing customers regarding module functionality.

QR Technical Support
Help Desk

Exclusive channel for technical assistance and bug reports.

COPY
ADDR
helpdesk@ganemo.com
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with