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

[17.0][MIG] l10n_es_aeat_mod303_oss: Migration to 17.0 #4009

Open
wants to merge 26 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9cd09c9
[ADD] l10n_es_aeat_mod303_oss: Add support for oss on 303
angelmoya Aug 18, 2021
5df45ee
[IMP] l10n_es_aeat_mod303_oss: Add field 124 and 127
RodrigoBM Aug 23, 2021
99c55f6
[MIG+IMP] l10n_es_aeat_mod303_oss: Migration to 13.0 + tests
pedrobaeza Oct 31, 2021
b6fd863
[MIG] l10n_es_aeat_mod303_oss: Migration to 14.0
pedrobaeza Oct 31, 2021
135abf9
[UPD] Update l10n_es_aeat_mod303_oss.pot
oca-travis Oct 31, 2021
0b7bbdb
Added translation using Weblate (Catalan)
extrememicro Feb 10, 2022
377aecc
[MIG]l10n_es_aeat_mod303_oss: Migration to 15.0
manuelregidor Apr 19, 2022
ba13b7e
[UPD] Update l10n_es_aeat_mod303_oss.pot
Apr 20, 2022
912c17a
[UPD] README.rst
OCA-git-bot Apr 20, 2022
971c4ca
Translated using Weblate (Catalan)
jabelchi May 19, 2022
39b4f10
[IMP] l10n_es_aeat_mod303_oss: Improve tests to validate fiscal position
victoralmau Apr 10, 2023
5b4df78
[IMP] l10n_es_aeat_mod303_oss: include lines oss in map mod303 2023
RodrigoBM Feb 23, 2023
0e28268
l10n_es_aeat_mod303_oss 15.0.1.1.0
OCA-git-bot Apr 12, 2023
3889214
[MIG] l10n_es_aeat_mod303_oss: Migration to 16.0
RodrigoBM May 30, 2023
131fddb
[UPD] Update l10n_es_aeat_mod303_oss.pot
Jun 24, 2023
3f47749
[UPD] README.rst
OCA-git-bot Jun 24, 2023
a65eed5
Added translation using Weblate (Spanish)
Gelo-fl Jul 31, 2023
37b8c10
Translated using Weblate (Spanish)
Gelo-fl Jul 31, 2023
2183262
[UPD] README.rst
OCA-git-bot Sep 3, 2023
7497e7c
[FIX] l10n_es_aeat_mod303_oss: Make sure company's country is set
pedrobaeza Dec 21, 2023
65827c1
[BOT] post-merge updates
OCA-git-bot Dec 21, 2023
6b56875
Added translation using Weblate (Catalan (ca_ES))
BrunoBailo Feb 1, 2024
5af470e
[IMP] l10n_es_aeat_mod303_oss: include lines oss in map mod303 2024-10
LauraCForgeFlow Oct 31, 2024
7c87e5c
[BOT] post-merge updates
OCA-git-bot Dec 19, 2024
b5d015c
[IMP] l10n_es_aeat_mod303_oss: pre-commit auto fixes
Tisho99 Feb 12, 2025
5b50fcb
[MIG] l10n_es_aeat_mod303_oss: Migration to 17.0
Tisho99 Feb 12, 2025
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
87 changes: 87 additions & 0 deletions l10n_es_aeat_mod303_oss/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
=====================
AEAT modelo 303 - OSS
=====================

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

.. |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-OCA%2Fl10n--spain-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-spain/tree/17.0/l10n_es_aeat_mod303_oss
:alt: OCA/l10n-spain
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_mod303_oss
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Módulo ampliación del modelo 303 (IVA - Autodeclaración) para incluir
los datos de la ventanilla única o One-Stop Shop (OSS).

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-spain/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/OCA/l10n-spain/issues/new?body=module:%20l10n_es_aeat_mod303_oss%0Aversion:%2017.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
-------

* PESOL
* Tecnativa

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

- Angel Moya <[email protected]>
- Rodrigo Bonilla <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza

- `Sygel <https://www.sygel.es>`__:

- Manuel Regidor
- Alberto Martínez

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

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/17.0/l10n_es_aeat_mod303_oss>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions l10n_es_aeat_mod303_oss/__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_mod303_oss/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2021 PESOL - Angel Moya
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0

{
"name": "AEAT modelo 303 - OSS",
"version": "17.0.1.1.0",
"category": "Accounting",
"author": "PESOL, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-spain",
"license": "AGPL-3",
"depends": ["l10n_es_aeat_mod303", "l10n_eu_oss_oca"],
"data": [
"data/2023/l10n.es.aeat.map.tax.line.csv",
"data/2024-10/l10n.es.aeat.map.tax.line.csv",
],
"installable": True,
"autoinstall": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,field_number,field_type,inverse,map_parent_id:id,move_type,name,sum_type,account_xmlid_ids/id,tax_xmlid_ids/id
aeat_mod303_2023_map_line_123,123,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,,
aeat_mod303_2023_map_line_124,124,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,,
aeat_mod303_2023_map_line_126,126,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,,
aeat_mod303_2023_map_line_127,127,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,field_number,field_type,inverse,map_parent_id:id,move_type,name,sum_type,account_xmlid_ids/id,tax_xmlid_ids/id
aeat_mod303_2024_10_map_line_123,123,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,,
aeat_mod303_2024_10_map_line_124,124,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,,
aeat_mod303_2024_10_map_line_126,126,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,,
aeat_mod303_2024_10_map_line_127,127,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,,
50 changes: 50 additions & 0 deletions l10n_es_aeat_mod303_oss/data/2024-10/l10n_es_aeat_map_tax_line.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Este fichero es necesario? Ya creas las l10n.es.aeat.map.tax.line.csv en l10n.es.aeat.map.tax.line.csv y tampoco aparece en el manifest.

<!-- Copyright 2021 PESOL - Angel Moya
Copyright 2021 FactorLibre - Rodrigo Bonilla
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="aeat_mod303_2024_10_map_line_123" model="l10n.es.aeat.map.tax.line">
<field name="map_parent_id" ref="l10n_es_aeat_mod303.aeat_mod303_2024_10_map" />
<field name="field_number">123</field>
<field
name="name"
>Operaciones no sujetas por reglas de localización acogidas a la OSS</field>
<field name="move_type">all</field>
<field name="field_type">base</field>
<field name="sum_type">both</field>
<field name="inverse" eval="False" />
<field name="tax_ids" eval="False" />
</record>
<record id="aeat_mod303_2024_10_map_line_124" model="l10n.es.aeat.map.tax.line">
<field name="map_parent_id" ref="l10n_es_aeat_mod303.aeat_mod303_2024_10_map" />
<field name="field_number">124</field>
<field name="name">OSS. Operaciones sujetas y acogidas a la OSS</field>
<field name="move_type">all</field>
<field name="field_type">base</field>
<field name="sum_type">both</field>
<field name="inverse" eval="False" />
<field name="tax_ids" eval="False" />
</record>
<record id="aeat_mod303_2024_10_map_line_126" model="l10n.es.aeat.map.tax.line">
<field name="map_parent_id" ref="l10n_es_aeat_mod303.aeat_mod303_2024_10_map" />
<field name="field_number">126</field>
<field
name="name"
>Operaciones no sujetas por reglas de localización acogidas a la OSS</field>
<field name="move_type">all</field>
<field name="field_type">base</field>
<field name="sum_type">both</field>
<field name="inverse" eval="False" />
<field name="tax_ids" eval="False" />
</record>
<record id="aeat_mod303_2024_10_map_line_127" model="l10n.es.aeat.map.tax.line">
<field name="map_parent_id" ref="l10n_es_aeat_mod303.aeat_mod303_2024_10_map" />
<field name="field_number">127</field>
<field name="name">OSS. Operaciones sujetas y acogidas a la OSS</field>
<field name="move_type">all</field>
<field name="field_type">base</field>
<field name="sum_type">both</field>
<field name="inverse" eval="False" />
<field name="tax_ids" eval="False" />
</record>
</odoo>
22 changes: 22 additions & 0 deletions l10n_es_aeat_mod303_oss/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_aeat_mod303_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-05-19 18:05+0000\n"
"Last-Translator: jabelchi <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: l10n_es_aeat_mod303_oss
#: model:ir.model,name:l10n_es_aeat_mod303_oss.model_l10n_es_aeat_mod303_report
msgid "AEAT 303 Report"
msgstr "Informe AEAT 303"
20 changes: 20 additions & 0 deletions l10n_es_aeat_mod303_oss/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_aeat_mod303_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ca_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#. module: l10n_es_aeat_mod303_oss
#: model:ir.model,name:l10n_es_aeat_mod303_oss.model_l10n_es_aeat_mod303_report
msgid "AEAT 303 Report"
msgstr ""
22 changes: 22 additions & 0 deletions l10n_es_aeat_mod303_oss/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_aeat_mod303_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-31 10:08+0000\n"
"Last-Translator: gelo joga Rodríguez <[email protected]>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: l10n_es_aeat_mod303_oss
#: model:ir.model,name:l10n_es_aeat_mod303_oss.model_l10n_es_aeat_mod303_report
msgid "AEAT 303 Report"
msgstr "Informe AEAT 303"
19 changes: 19 additions & 0 deletions l10n_es_aeat_mod303_oss/i18n/l10n_es_aeat_mod303_oss.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_aeat_mod303_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: l10n_es_aeat_mod303_oss
#: model:ir.model,name:l10n_es_aeat_mod303_oss.model_l10n_es_aeat_mod303_report
msgid "AEAT 303 Report"
msgstr ""
2 changes: 2 additions & 0 deletions l10n_es_aeat_mod303_oss/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import l10n_es_aeat_map_tax_line
from . import mod303
27 changes: 27 additions & 0 deletions l10n_es_aeat_mod303_oss/models/l10n_es_aeat_map_tax_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2021 PESOL - Angel Moya
# Copyright 2021 FactorLibre - Rodrigo Bonilla <[email protected]>
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0

from odoo import models


class L10nEsAeatMapTaxLine(models.Model):
_inherit = "l10n.es.aeat.map.tax.line"

def get_taxes_for_company(self, company):
self.ensure_one()
oss_map_lines = [
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2023_map_line_123"),
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2023_map_line_126"),
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2024_10_map_line_123"),
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2024_10_map_line_126"),
]
if self in oss_map_lines:
return self.env["account.tax"].search(
[
("oss_country_id", "!=", False),
("company_id", "=", company.id),
]
)
return super().get_taxes_for_company(company)
34 changes: 34 additions & 0 deletions l10n_es_aeat_mod303_oss/models/mod303.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2021 PESOL - Angel Moya
# Copyright 2021 FactorLibre - Rodrigo Bonilla <[email protected]>
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0

from odoo import models


class L10nEsAeatMod303Report(models.Model):
_inherit = "l10n.es.aeat.mod303.report"

def _get_tax_lines(self, date_start, date_end, map_line):
"""Don't populate results for fields 126-127 for reports different from
last of the year one or when not exonerated of presenting model 390.
"""
res = super()._get_tax_lines(date_start, date_end, map_line)
if map_line.field_number in (126, 127):
if (
self.exonerated_390 == "2"
or not self.has_operation_volume
or self.period_type not in ("4T", "12")
):
return self.env["account.move.line"]
return res

def _get_move_line_domain(self, date_start, date_end, map_line):
"""Change dates to full year when the summary on last report of the year for the
corresponding fields. Only field number is checked as the complete check for not
bringing results is done on `_get_tax_lines`.
"""
if map_line.field_number in (126, 127):
date_start = date_start.replace(day=1, month=1)
date_end = date_end.replace(day=31, month=12)
return super()._get_move_line_domain(date_start, date_end, map_line)
3 changes: 3 additions & 0 deletions l10n_es_aeat_mod303_oss/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
7 changes: 7 additions & 0 deletions l10n_es_aeat_mod303_oss/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- Angel Moya \<<[email protected]>\>
- Rodrigo Bonilla \<<[email protected]>\>
- [Tecnativa](https://www.tecnativa.com):
- Pedro M. Baeza
- [Sygel](https://www.sygel.es):
- Manuel Regidor
- Alberto Martínez
2 changes: 2 additions & 0 deletions l10n_es_aeat_mod303_oss/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Módulo ampliación del modelo 303 (IVA - Autodeclaración) para incluir
los datos de la ventanilla única o One-Stop Shop (OSS).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading