Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] l10n_es_aeat_mod390 #4045

Draft
wants to merge 75 commits into
base: 18.0
Choose a base branch
from

Conversation

sergioM-S73
Copy link

@sergioM-S73 sergioM-S73 commented Feb 25, 2025

Depends on:

pedrobaeza and others added 30 commits February 24, 2025 18:20
================================
Presentación del Modelo AEAT 390
================================

Modelo 390 de la AEAT. Declaración-resumen anual del Impuesto sobre el Valor
Añadido.

Instalación
===========

Este módulo requiere del módulo *account_tax_balance* que se encuentra en
https://github.com/OCA/account-financial-reporting.

Uso
===

Para crear un modelo, por ejemplo de un trimestre del año:

1. Ir a *Contabilidad > Declaraciones AEAT > Modelo 390*.
2. Pulsar en el botón "Crear"
3. Seleccionar el ejercicio fiscal.
4. Seleccionar el tipo de declaración.
5. Rellenar el teléfono y teléfono móvil, necesarios para la exportacion BOE
6. Guardar y pulsar en el botón "Calcular"
7. Rellenar (si es necesario) aquellos campos que Odoo no calcula
   automáticamente.
8. Cuando los valores sean los correctos, pulsar en el botón "Confirmar"
9. Podemos exportar en formato BOE para presentarlo telemáticamente en el
   portal de la AEAT

Problemas conocidos / Hoja de ruta
==================================

* La declaración sólo se puede realizar para personas jurídicas.
* No se han implementado todas las casillas de opciones de la empresa, como
  por ejemplo si la empresa está en concurso de acreedores o si pertenece
  al registro de devolución mensual.
* No se calculan operaciones intragrupo.
* No se contempla el régimen de criterio de caja.
* No se contempla el régimen especial de bienes usados, objetos de arte,
  antigüedades y objetos de colección.
* No se contempla el régimen especial de agencias de viaje.
* No se contempla el régimen especial de la agricultura, ganadería y pesca.
* No se contempla la prorrata general de IVA.
* No se contempla el régimen simplificado.
* No se contempla el régimen de deducción diferenciado.
* No se contempla la inversión de sujeto pasivo nacional.
* No se ha incluido el cálculo para los bienes de inversión.
* No se ha incluido el cálculo para otros supuestos de inversión de sujeto
  pasivo.
* No se tienen en cuenta tributaciones territoriales.
* Obtener las casillas 95, 97 y 98 de las declaraciones del 303.
This way, we don't initially see all the subconfigs for each model and we can concentrate
on main export configurations. This is got through `active` field default behaviour.
Archived config are still directly searchable through the subconfig selector in the
configuration line.

All models export configs have been adapted to this new approach.
Currently translated at 100.0% (137 of 137 strings)

Translation: l10n-spain-12.0/l10n-spain-12.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-l10n_es_aeat_mod390/es/
* Include chatter (mail.thread)
* Include activities (mail.activity.mixin)
* Track AEAT report state change
* Include new admin user in AEAT group by default
- Añadido Diseño de registro dr390e2019v100 para declaración de 2019
…n tests

This way, we can reuse it in other modules that don't inherit AEAT report like SII.

We also clean a non needed reading of the tax description field.

Tests were still using description method for populating data, so we switch to new
system and perform needed changes in dependent tests.

s
New tax "IVA Exento No Sujeto" must be included in field 105.
…ax fee fields

Twin of 6c3a6f2, but for model 390.

This includes the complete revision of the rest of the fields for
putting them for both signs. At the end, the refund part is controlled
by move_type, not by balance sign.

Fixes OCA#1585
This field is for reflecting RE operations that are not included with
normal VAT, so we don't have such thing in Odoo Spanish CoAs.

The explanation for this field is:

```
102. Operaciones realizadas por sujetos pasivos acogidos al Régimen
especial del recargo de equivalencia: si el sujeto pasivo es persona
física o entidad en régimen de atribución de rentas en el Impuesto sobre
la Renta de las Personas Físicas que realiza alguna actividad de
comercio al por menor a la que sea aplicable el régimen especial del
recargo de equivalencia, hará constar en esta casilla el importe, de las
entregas de bienes realizadas en el ámbito de dicho régimen especial,
excluido el propio IVA.
```

The important part is the last "excluido el propio IVA", which gives
the key about the exclusion.
Fields [95], [97] and [98] are manually entered, and they should match
the result of the report, so we check this before letting users to
confirm and having the error on AEAT website.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-spain-14.0/l10n-spain-14.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-14-0/l10n-spain-14-0-l10n_es_aeat_mod390/
Currently translated at 100.0% (163 of 163 strings)

Translation: l10n-spain-14.0/l10n-spain-14.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-14-0/l10n-spain-14-0-l10n_es_aeat_mod390/es/
…ertain fields

There are certain fields that doesn't split refunds and regular amounts,
so we need to cover it in the same field, having refunds that decrease
the amount on the field. The only currently applicable one is the field
230, as it's the only with mapped taxes, but this commit changes
preventively other fields with currently no taxes to the same type in
case anytime are populated.

TT34123
The tax "Extracomunitario (servicios)" should go into this field instead
of in field 104, as these are the cases for the 104 field:

```
- La suma total de las contraprestaciones correspondientes a
exportaciones y operaciones asimiladas a la exportación o, en su
defecto, los valores en el interior de las operaciones reseñadas
(artículos 21 y 22 de la Ley del IVA.).
- El importe de las bases imponibles correspondientes a las devoluciones
efectuadas durante el año como consecuencia de las exportaciones
realizadas en régimen de viajeros.
- El importe de las operaciones exentas del Impuesto en virtud de lo
dispuesto en los artículos 23 y 24 de la Ley del IVA.
- El importe de las prestaciones de servicios relacionadas con la
importación y cuya contraprestación esté incluida en la base imponible
de las importaciones.
- El importe de las prestaciones de servicios exentas realizadas en
aplicación del régimen especial de las agencias de viajes (artículo 143
de la Ley del IVA).
```

which neither of them fits with this case.

On contrary, field 110 serves for this purpose:

```
Se hará constar el importe de las entregas de bienes y prestaciones de
servicios no sujetas por aplicación de las reglas de localización...
```

TT34160
pedrobaeza and others added 30 commits February 24, 2025 18:20
- Standard procedure.
- Remove old BOE export format stuff.
- Switch fields to Monetary.
- Transform states + attrs into XML views.
- Transform to new tax map line system.
- Better layout on totals + result pages.

TT48487
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-spain-17.0/l10n-spain-17.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_mod390/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-spain-17.0/l10n-spain-17.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_mod390/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-spain-17.0/l10n-spain-17.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_mod390/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-spain-17.0/l10n-spain-17.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_mod390/
@moduon MT-4520

Co-authored-by: Rafael Blasco <8736623+rafaelbn@users.noreply.github.com>
Co-authored-by: Arantxa Sudón <104626993+ArantxaSudon@users.noreply.github.com>
Co-authored-by: Loida Vilaplana <104626797+loida-vm@users.noreply.github.com>
Co-authored-by: Pedro M. Baeza <7165771+pedrobaeza@users.noreply.github.com>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-spain-17.0/l10n-spain-17.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_mod390/
Models like 303 and 390 have a lot of fields, so showing them all even
if the amount is 0 can be counterproductive. Thanks to the magic of
one2many fields, we can continue calculating all the fields and showing
them for traceability purposes, but filter out in another o2m field
those with amount with hardly no cost, and now 2 tabs are shown for
these lines, having precedence the filtered one.
The 12% VAT for agriculture et al. were missing in the mapping and the
sum, so we need to include it as the tax is present and it's declared
in the 303 model.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-spain-17.0/l10n-spain-17.0-l10n_es_aeat_mod390
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_mod390/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.