The frustration of an advance payment that cannot be regularized
Imagine Carlos, manager of a construction company in Lima. He has just closed an important contract for a six-month project. His client, fulfilling what was agreed, gives him a 30% advance to start the work. Carlos issues the advance invoice from Odoo's accounting module, since it does not come from a specific sales order. Everything seems fine until the following month, when he needs to issue the regular invoice for the first progress payments. Here the problem appears: standard Odoo does not allow him to regularize that advance from accounting; it only works if it comes from a sales order. Carlos faces hours of manual work, the risk of errors and the possibility that SUNAT rejects his receipts. This situation, common in many Peruvian businesses, is exactly what our specialized solution resolves.
The limitation of the standard advance in Odoo
Odoo version 19 includes native advance functionality, but with a significant restriction: it only works within the sales module. When you create a sales order and generate an advance, the system automatically sets certain hidden fields that identify the lines as advances and sends code 4 in the XML for SUNAT. The flow is simple: you create the sales order, set the advance percentage, confirm, and Odoo generates a draft invoice with the "advance" product. Then, when creating the regularization invoice, the system automatically includes the negative advance line. All of this works automatically and transparently for the user, but only when you start from a sales order.
Practical example: A medical supplies distributor receives an order from a hospital for 50,000 soles. The hospital requests an advance of 40% before shipping the goods. Since the sale is already recorded in Odoo as a sales order, the billing team can use the standard functionality: they create the advance from the same order, confirm it, and when it is time to invoice the rest, Odoo automatically deducts the advance. The problem arises when the advance is not linked to a specific order, as in the case of professional services or long-term contracts. This is where companies like Ganemo implement solutions that extend this functionality to all the modules that need it.
The solution: advances from the accounting module
For businesses that need to issue advance invoices without depending on a sales order, we have implemented the full functionality for the accounting module in our Peruvian localization. The first advance invoice is created normally: you select the customer, the advance product (a service with no special configuration), the amount, and confirm. The real added value appears when regularizing that advance. Instead of relying on automations that only work in sales, our system guides you through a minimal but crucial manual process to meet SUNAT requirements.
Real use case: An architecture firm has a corporate client that hires its services for one year. They receive an initial advance of 10,000 soles to start the project. With our solution implemented by Ganemo, the accountant creates the advance invoice normally from accounting. One month later, when issuing the first monthly invoice for services, he adds a negative line with the advance product for -10,000 soles. He marks the "advance" field and enters the number of the original advance invoice. Upon confirming and sending to SUNAT, the generated XML correctly includes the advance tag with code 4 and references the original invoice, complying with all Peruvian tax requirements. This flow, although it requires minimal manual intervention, guarantees full compliance.
The step-by-step process to regularize advances
Regularizing an advance from accounting follows a logic similar to the automatic sales flow, but with conscious user intervention. First, you create the final invoice as you normally would, with all product or service lines. Then, you add an additional line with the advance product at a negative value (exactly the amount of the advance received). Here comes the crucial part: you must explicitly mark the "advance" field and fill in the number of the original advance invoice. You can also add the invoice date if necessary. The rest of the fields (payment terms, document type, additional information) follow your usual flow. Once confirmed, the invoice is sent to SUNAT with the correct structure.
Illustrative example: A Peruvian software-as-a-service (SaaS) company offers prepaid annual subscriptions. A customer pays 6,000 soles in advance. The administrative team, using Odoo with Ganemo's localization, issues the advance invoice. Month by month, when billing the service, they add a line of -500 soles (part of the advance) marked as advance and referencing the original invoice. This not only complies with SUNAT but also keeps accounting clean and allows exact tracking of what has been invoiced versus what has been advanced. The manual intervention is minimal (ticking a field and entering a number), but the difference in compliance is enormous.
The importance of correct XML for SUNAT
The final result of this whole process must be an XML that SUNAT accepts without observations. When you use our solution, the generated XML includes the tag corresponding to the advance in the discounts block, sending code 4, which specifically identifies a discount for advances. Additionally, in the additional information section, it references exactly which advance invoice is being regularized. If you do not activate the advance field or associate the invoice number, Odoo would interpret the negative line as a normal discount, generating an incorrect XML that SUNAT could reject or that would not reflect the tax reality of the operation.
Critical situation avoided: A logistics company nearly faced a SUNAT fine because its advance regularization invoices did not correctly reference the original invoices. By implementing our solution through Ganemo, they not only resolved the compliance issue but also automated the tracking of pending advances to regularize. Now, every time they create an invoice that must deduct an advance, the system automatically suggests the available advances for that customer, reducing errors and processing time by 70%. The investment in a specialized solution paid for itself by avoiding a single fine.
Conclusion: more than a feature, a business necessity
Managing advances correctly is not a luxury but a necessity for any serious company in Peru. The limitation of standard Odoo leaves out all those businesses whose advances do not come from specific sales orders: consulting, professional services, construction, software, and many more. Our implementation in the accounting module closes this gap with a minimal but effective manual process. As we have seen in the examples, from construction companies to architecture firms and SaaS companies, the ability to manage advances from any module is crucial for smooth operations and full SUNAT compliance.
If your company faces these challenges or is currently working with complex manual processes to regularize advances, at Ganemo we have the proven solution ready to implement. We not only solve the technical problem, but also accompany you in adapting your processes to maximize efficiency. Contact us to evaluate how we can help you turn the management of your advances from an administrative burden into a competitive advantage.