| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) • Contacts (contacts) • Accounting (accountant) |
| Lines of code | 43 |
| Technical Name |
l10n_ec_ats_sales_retention |
| License | OPL-1 |
| Website | https://www.ganemo.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) • Contacts (contacts) • Accounting (accountant) |
| Lines of code | 43 |
| Technical Name |
l10n_ec_ats_sales_retention |
| License | OPL-1 |
| Website | https://www.ganemo.com |
ATS Sales Retention
Real Withholding Values in Your ATS Report
Fix the Ecuadorian ATS report so that <valorRetIva> and
<valorRetRenta> reflect the actual withholding amounts received from customers,
ensuring full SRI compliance.
What We're Solving
----------------
The Problem
Odoo's native ATS report always outputs
<valorRetIva>0.00</valorRetIva> and
<valorRetRenta>0.00</valorRetRenta> in the sales section,
even when customer withholdings (out_withhold) have been registered
against sale invoices.
Our Fix
This module overrides the sales grouping logic to query real withholding data from posted out_withhold records, summing the actual IVA and Renta retention amounts per commercial partner. The ATS XML output now reflects truthful, SRI-compliant values.
Setup & User Manual
Step-by-Step implementation
1. Installation
Zero configuration needed — just install and go:
- Go to Apps and search for "ATS Sales Retention".
- Click Install.
- The module automatically enhances the existing ATS report.
- No additional configuration is required.
l10n_ec_reports_ats must be installed. This is the standard Ecuadorian
ATS report module that comes with Odoo Enterprise.
2. How It Works
After installation, the ATS report automatically includes real retention values:
Create & Post Invoice
Create a sale invoice (out_invoice) and post
it as usual. Your customer will then apply withholdings.
Register Withholding
Register the customer's withholding
(out_withhold) using the standard Odoo withholding wizard.
Select the IVA and/or Renta retention taxes.
Generate ATS Report
Go to Accounting → Reports → Tax Report → ⚙️ →
ATS. The generated XML will now contain the correct
valorRetIva and valorRetRenta.
SRI Compliance
The values are calculated from posted withholding records only, grouped by the same commercial partner key the SRI expects.
Safety & Future-Proofing
Zero-risk module design
Proactive Protection
What happens if Odoo fixes this bug natively in a future update? Nothing breaks. The module includes a built-in guard that detects if the base method already returns non-zero retention values. If Odoo starts calculating them on its own, this module automatically skips its override to avoid duplicating amounts.
valorRetIva ≠ 0 or valorRetRenta ≠ 0.
If so, it returns immediately without modifying any data.
Safe Uninstallation
This module can be uninstalled at any time with zero risk. It does not create any database tables, fields, views, or stored data. It only provides a Python method override that is cleanly removed when uninstalled.
- No database tables created
- No new fields added
- No XML views to revert
- No data records to clean up
- No orphan configurations
Global Ready | Multi-Language Support
This module is fully translated into English and Spanish (en_US, es_ES, es_EC), ensuring a professional experience for Ecuadorian and international organizations.
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.
Official WhatsApp
Fastest response time.
LINK
+1 (828) 672-6150
Book a Demo
Let's explore your needs.
LINK
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 the latest Odoo version with zero data loss. Expert developers at your service.
QA / User Testing Scenarios
Enterprise Validation Plan
Scenario 1: Basic IVA Retention
- Create and post a sale invoice for a customer with RUC.
- Register an out_withhold with a 10% IVA retention tax.
- Generate the ATS report.
- Expected:
<valorRetIva>shows the actual 10% IVA retention amount (NOT 0.00). - Expected:
<valorRetRenta>remains 0.00 (no income retention applied).
Scenario 2: Combined IVA + Renta Retention
- Create and post a sale invoice.
- Register an out_withhold with both IVA retention and Income Tax retention.
- Generate the ATS report.
- Expected:
<valorRetIva>shows the IVA withholding amount. - Expected:
<valorRetRenta>shows the Income Tax withholding amount.
Scenario 3: Multiple Invoices Same Partner
- Create 3 sale invoices for the same partner.
- Register out_withhold on each with different retention amounts.
- Generate the ATS report.
- Expected: The values are summed correctly under a single partner entry in the ATS XML.
Scenario 4: Cancelled Withholding
- Create a sale invoice and register an out_withhold.
- Cancel the withholding.
- Generate the ATS report.
- Expected: The cancelled withholding amounts are NOT included in valorRetIva/valorRetRenta (only posted withholdings count).
FAQ & Troubleshooting
Common Resolutions
Still seeing 0.00 after installing?
Reason: The withholding may not be
in posted state, or the taxes used are not of type
withhold_vat_sale / withhold_income_sale.
Fix: Verify the withholding is posted and uses the correct Ecuadorian tax groups for sales retentions.
Does this affect purchase withholdings?
Answer: No.
Detail:
This module only modifies the sales section
(<ventas>)
of the ATS. Purchase withholdings (in_withhold) are handled separately
and remain unchanged.
Is this compatible with standard l10n_ec_edi?
Answer: Yes, 100% compatible.
Detail:
This module uses the same withholding infrastructure that l10n_ec_edi
provides. It simply reads data that was already being saved but not reported.
Which Odoo versions are supported?
Answer: Odoo 18 Enterprise.
Detail: Compatible with Odoo.SH, Ganemo Online, and Ganemo.SH deployments.
Commercial & Sales
For inquiries about licenses, demos, or partnerships.
Official WhatsApp
Fastest response time.
LINK
+1 (828) 672-6150
Book a Demo
Let's explore your needs.
LINK
Technical Support
Existing customers regarding module functionality.
Help Desk
Exclusive channel for technical assistance and bug reports.
help@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