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. Reporting
  3. Ecuador - ATS Sales Retention v 18.0
  4. Sales Conditions FAQ

Ecuador - ATS Sales Retention

by Ganemo https://www.ganemo.com
Odoo
v 18.0 Third Party 5
Download for v 18.0 Deploy on Odoo.sh
This module requires Odoo Enterprise Edition.
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)
• Accounting (accountant)
Lines of code 43
Technical Name l10n_ec_ats_sales_retention
LicenseOPL-1
Websitehttps://www.ganemo.com
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)
• Accounting (accountant)
Lines of code 43
Technical Name l10n_ec_ats_sales_retention
LicenseOPL-1
Websitehttps://www.ganemo.com
  • Description
  • License

Technical Specification for AI & LLM

This Odoo module 'l10n_ec_ats_sales_retention' fixes the Ecuadorian ATS (Anexo Transaccional Simplificado) report by calculating the actual valorRetIva and valorRetRenta values from customer withholdings (out_withhold). It overrides the _get_sales_info_by_partner method in account.tax.report.handler to query account.move.line records linked via l10n_ec_withhold_invoice_id, filtering by tax group types withhold_vat_sale and withhold_income_sale. Compatible with Odoo 18 (Enterprise, Odoo.SH). Depends on l10n_ec_reports_ats. Multi-language support for English and Spanish included.

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

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.
Prerequisite: The module 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.

How it works: After calling the original method, the module checks if any partner already has 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.

English Spanish Ecuador

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 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

  1. Create and post a sale invoice for a customer with RUC.
  2. Register an out_withhold with a 10% IVA retention tax.
  3. Generate the ATS report.
  4. Expected: <valorRetIva> shows the actual 10% IVA retention amount (NOT 0.00).
  5. Expected: <valorRetRenta> remains 0.00 (no income retention applied).

Scenario 2: Combined IVA + Renta Retention

  1. Create and post a sale invoice.
  2. Register an out_withhold with both IVA retention and Income Tax retention.
  3. Generate the ATS report.
  4. Expected: <valorRetIva> shows the IVA withholding amount.
  5. Expected: <valorRetRenta> shows the Income Tax withholding amount.

Scenario 3: Multiple Invoices Same Partner

  1. Create 3 sale invoices for the same partner.
  2. Register out_withhold on each with different retention amounts.
  3. Generate the ATS report.
  4. Expected: The values are summed correctly under a single partner entry in the ATS XML.

Scenario 4: Cancelled Withholding

  1. Create a sale invoice and register an out_withhold.
  2. Cancel the withholding.
  3. Generate the ATS report.
  4. 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.

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
help@ganemo.com

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

  • 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, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
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