Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions l10n_es_aeat_sii_oca_extension/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
=======================================================
Suministro Inmediato de Información en el IVA Extension
=======================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9eca57c8e44bf6514362004fcb23f016cda0be94835c9130dbe2fa010b81ddef
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-NuoBiT%2Fodoo--addons-lightgray.png?logo=github
:target: https://github.com/NuoBiT/odoo-addons/tree/18.0/l10n_es_aeat_sii_oca_extension
:alt: NuoBiT/odoo-addons

|badge1| |badge2| |badge3|

This module extends the OCA SII (Suministro Inmediato de Información en
el IVA) module with additional functionalities and fixes that are not
accepted or delayed by the OCA l10n_spain localization community.

**All Features Provided:**

**1. CuotaDeducible Support (Partially Deductible Taxes)**

For Received Invoices (Vendor Bills):

- Automatically calculates the actual deductible amount of VAT based on
tax configuration
- Only includes the portion that is truly deductible (based on tax
repartition lines with account)
- Adds the CuotaDeducible field to SII submissions for received invoices
- Works for taxes mapped as SFRS (IVA Soportado) and SFRISP (IVA
Inversión del Sujeto Pasivo)

How it works:

- Extends ``account.move.line`` to track actual deductible amounts
during tax processing
- Automatically sums deductible portions based on tax repartition
configuration
- No configuration needed - works automatically if tax has partial
deductibility configured

**2. Clave "06" Support (Grupo de Entidades - Modalidad Avanzada)**

Problem Solved:

Companies using **ClaveRegimenEspecialOTrascendencia = "06"** (VAT group
in advanced mode) receive **SII Error 1234** when submitting invoices
with both services and goods.

What the module does automatically:

- For Outgoing Invoices (Customer Invoices):

- Merges services (PrestacionServicios) and goods (Entrega) into a
single tax breakdown
- Consolidates multiple tax lines with the same rate (TipoImpositivo)
into one line
- Transforms from DesgloseTipoOperacion to DesgloseFactura structure
- Calculates and adds BaseImponibleACoste field automatically
- Rounds BaseImponibleACoste to proper decimal precision

- For Incoming Invoices (Vendor Bills):

- Calculates and adds BaseImponibleACoste field automatically
- Ensures proper structure for AEAT validation

Result: SII submissions pass AEAT validation without Error 1234

**3. Extensible Tax Agency Hooks**

For Advanced Customizations:

- Provides hooks in ``aeat.tax.agency`` model to extend SII web service
configurations
- Methods ``_prepare_sii_wdsl_mapping()`` and
``_prepare_sii_port_name_mapping()`` can be overridden
- Allows custom modules to add new WSDL endpoints or modify connection
parameters
- Useful for specialized tax agency configurations or testing
environments

**When to Use This Module:**

Install this module if you need:

- Partially deductible VAT reporting (CuotaDeducible field in received
invoices)
- VAT group in advanced mode (modalidad avanzada) with clave "06"
- Fix for SII Error 1234 when submitting invoices with services + goods
- Custom tax agency configurations (extensibility hooks)

**How It Works:**

The module works automatically after installation:

- No configuration required for standard features
- Only activates clave "06" transformations when registration key = "06"
is detected
- Doesn't affect other invoices - backwards compatible
- CuotaDeducible is calculated for all received invoices based on tax
configuration
- All transformations happen transparently during SII submission

**Technical Details:**

Models Extended:

- ``account.move`` - Adds SII invoice processing for clave "06" and
CuotaDeducible
- ``account.move.line`` - Tracks actual deductible amounts during tax
processing
- ``aeat.tax.agency`` - Provides extensibility hooks for custom
configurations

Key Methods:

- ``_get_sii_in_taxes_deductible()`` - Calculates deductible VAT amount
- ``_get_sii_out_taxes()`` - Transforms tax breakdown for clave "06"
outgoing invoices
- ``_get_sii_invoice_dict_in()`` - Adds CuotaDeducible and
BaseImponibleACoste to received invoices
- ``_get_sii_invoice_dict_out()`` - Adds BaseImponibleACoste to sent
invoices
- ``_process_aeat_tax_base_info()`` / ``_process_aeat_tax_fee_info()`` -
Track deductible amounts

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/NuoBiT/odoo-addons/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/NuoBiT/odoo-addons/issues/new?body=module:%20l10n_es_aeat_sii_oca_extension%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* NuoBiT Solutions SL

Contributors
------------

- `NuoBiT <https://www.nuobit.com>`__:

- Frank Cespedes fcespedes@nuobit.com
- Kilian Niubo kniubo@nuobit.com
- Deniz Gallo dgallo@nuobit.com

Maintainers
-----------

This module is part of the `NuoBiT/odoo-addons <https://github.com/NuoBiT/odoo-addons/tree/18.0/l10n_es_aeat_sii_oca_extension>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions l10n_es_aeat_sii_oca_extension/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions l10n_es_aeat_sii_oca_extension/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright NuoBiT Solutions SL - Eric Antones <eantones@nuobit.com>
# Copyright NuoBiT Solutions SL - Kilian Niubo <kniubo@nuobit.com>
# Copyright 2025 NuoBiT Solutions SL - Deniz Gallo <dgallo@nuobit.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Suministro Inmediato de Información en el IVA Extension",
"summary": "This module extends the OCA SII module with new functionalities "
"and fixes that are not accepted or delayed recurrently by "
"the OCA l10n_spain localization community",
"author": "NuoBiT Solutions SL",
"category": "Accounting & Finance",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"website": "https://github.com/NuoBiT/odoo-addons",
"depends": [
"l10n_es_aeat_sii_oca",
],
}
2 changes: 2 additions & 0 deletions l10n_es_aeat_sii_oca_extension/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import account_move
from . import aeat_tax_agency
Loading
Loading