From 5e99c1e5742a6e5a5268280e805edc97f689e70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Mon, 13 Mar 2023 17:19:00 +0100 Subject: [PATCH 01/37] [ADD] l10n_es_aeat_mod303_vat_prorate: New module TT41832 --- l10n_es_aeat_mod303_vat_prorate/README.rst | 104 ++++ l10n_es_aeat_mod303_vat_prorate/__init__.py | 1 + .../__manifest__.py | 13 + l10n_es_aeat_mod303_vat_prorate/i18n/es.po | 36 ++ .../i18n/l10n_es_aeat_mod303_vat_prorate.pot | 36 ++ .../models/__init__.py | 1 + .../models/mod303.py | 27 ++ .../readme/CONFIGURE.rst | 2 + .../readme/CONTRIBUTORS.rst | 4 + .../readme/DESCRIPTION.rst | 8 + .../readme/USAGE.rst | 3 + .../static/description/icon.png | Bin 0 -> 5861 bytes .../static/description/index.html | 446 ++++++++++++++++++ .../tests/__init__.py | 1 + .../test_l10n_es_aeat_mod303_vat_prorate.py | 40 ++ 15 files changed, 722 insertions(+) create mode 100644 l10n_es_aeat_mod303_vat_prorate/README.rst create mode 100644 l10n_es_aeat_mod303_vat_prorate/__init__.py create mode 100644 l10n_es_aeat_mod303_vat_prorate/__manifest__.py create mode 100644 l10n_es_aeat_mod303_vat_prorate/i18n/es.po create mode 100644 l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot create mode 100644 l10n_es_aeat_mod303_vat_prorate/models/__init__.py create mode 100644 l10n_es_aeat_mod303_vat_prorate/models/mod303.py create mode 100644 l10n_es_aeat_mod303_vat_prorate/readme/CONFIGURE.rst create mode 100644 l10n_es_aeat_mod303_vat_prorate/readme/CONTRIBUTORS.rst create mode 100644 l10n_es_aeat_mod303_vat_prorate/readme/DESCRIPTION.rst create mode 100644 l10n_es_aeat_mod303_vat_prorate/readme/USAGE.rst create mode 100644 l10n_es_aeat_mod303_vat_prorate/static/description/icon.png create mode 100644 l10n_es_aeat_mod303_vat_prorate/static/description/index.html create mode 100644 l10n_es_aeat_mod303_vat_prorate/tests/__init__.py create mode 100644 l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py diff --git a/l10n_es_aeat_mod303_vat_prorate/README.rst b/l10n_es_aeat_mod303_vat_prorate/README.rst new file mode 100644 index 00000000000..9b1bcc904e2 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/README.rst @@ -0,0 +1,104 @@ +===================== +Prorrata de IVA [303] +===================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/14.0/l10n_es_aeat_mod303_vat_prorate + :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-14-0/l10n-spain-14-0-l10n_es_aeat_mod303_vat_prorate + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/l10n-spain&target_branch=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Este módulo contempla la casuística de prorrata en el modelo 303 cuando se han +creado ya los apuntes contables separados con el módulo `l10n_es_vat_prorate`. + +Esto es necesario si se cuenta con el SII y se debe enviar la información ya +seccionada. + +Para el caso de que se quiera hacer la repartición con el asiento de liquidación +del IVA, utilizar `l10n_es_aeat_vat_prorrate`. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + + Para entender el funcionamiento de la prorrata, remitirse a la configuración de + `l10n_es_aeat_vat_prorate`. + +Usage +===== + +#. Realizar la declaración 303 de la forma habitual. +#. El IVA deducible ya vendrá minorado por el porcentaje de la prorrata. +#. En la casilla 44, se mostrará el importe de la prorrata que se minoró. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_ + + * Pedro M. Baeza + * Víctor 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. + +.. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px + :target: https://github.com/victoralmau + :alt: victoralmau + +Current `maintainer `__: + +|maintainer-victoralmau| + +This module is part of the `OCA/l10n-spain `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_es_aeat_mod303_vat_prorate/__init__.py b/l10n_es_aeat_mod303_vat_prorate/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py new file mode 100644 index 00000000000..0697f35210d --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py @@ -0,0 +1,13 @@ +# Copyright 2023 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + "name": "Prorrata de IVA [303]", + "version": "14.0.1.0.0", + "category": "Human Resources", + "website": "https://github.com/OCA/l10n-spain", + "author": "Tecnativa, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["l10n_es_vat_prorate", "l10n_es_aeat_mod303"], + "installable": True, + "maintainers": ["victoralmau"], +} diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/es.po b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po new file mode 100644 index 00000000000..8317a58eaeb --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_aeat_mod303_vat_prorate +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-14 08:58+0000\n" +"PO-Revision-Date: 2023-03-14 08:58+0000\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_vat_prorate +#: model:ir.model,name:l10n_es_aeat_mod303_vat_prorate.model_l10n_es_aeat_mod303_report +msgid "AEAT 303 Report" +msgstr "Modelo AEAT 303" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__display_name +msgid "Display Name" +msgstr "Nombre a mostrar" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__id +msgid "ID" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report____last_update +msgid "Last Modified on" +msgstr "Última modificación en" diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot new file mode 100644 index 00000000000..2d7da7ea230 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_aeat_mod303_vat_prorate +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-14 08:57+0000\n" +"PO-Revision-Date: 2023-03-14 08:57+0000\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_vat_prorate +#: model:ir.model,name:l10n_es_aeat_mod303_vat_prorate.model_l10n_es_aeat_mod303_report +msgid "AEAT 303 Report" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__id +msgid "ID" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report____last_update +msgid "Last Modified on" +msgstr "" diff --git a/l10n_es_aeat_mod303_vat_prorate/models/__init__.py b/l10n_es_aeat_mod303_vat_prorate/models/__init__.py new file mode 100644 index 00000000000..d2c87b1d2e5 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/models/__init__.py @@ -0,0 +1 @@ +from . import mod303 diff --git a/l10n_es_aeat_mod303_vat_prorate/models/mod303.py b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py new file mode 100644 index 00000000000..1c6d61d16aa --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py @@ -0,0 +1,27 @@ +# Copyright 2023 Tecnativa - Víctor Martínez +# 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_taxes_from_map(self, map_line): + if map_line.field_number == 44 and self.company_id.with_vat_prorate: + return self.env["account.tax"].search( + [ + ("company_id", "=", self.company_id.id), + ("with_vat_prorate", "=", True), + ] + ) + return super().get_taxes_from_map(map_line) + + def _get_move_line_domain(self, date_start, date_end, map_line): + """Se define el importe de la prorata para la casilla 44. + Ejemplo: 10€ y prorata del 99%, se devolverá 9.9 + """ + res = super()._get_move_line_domain(date_start, date_end, map_line) + if map_line.field_number == 44 and self.company_id.with_vat_prorate: + res += [("vat_prorate", "=", False)] + return res diff --git a/l10n_es_aeat_mod303_vat_prorate/readme/CONFIGURE.rst b/l10n_es_aeat_mod303_vat_prorate/readme/CONFIGURE.rst new file mode 100644 index 00000000000..21ca26769cf --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/readme/CONFIGURE.rst @@ -0,0 +1,2 @@ + Para entender el funcionamiento de la prorrata, remitirse a la configuración de + `l10n_es_aeat_vat_prorate`. diff --git a/l10n_es_aeat_mod303_vat_prorate/readme/CONTRIBUTORS.rst b/l10n_es_aeat_mod303_vat_prorate/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..4c9d0f2a9a2 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_ + + * Pedro M. Baeza + * Víctor Martínez diff --git a/l10n_es_aeat_mod303_vat_prorate/readme/DESCRIPTION.rst b/l10n_es_aeat_mod303_vat_prorate/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..3abf5766e26 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/readme/DESCRIPTION.rst @@ -0,0 +1,8 @@ +Este módulo contempla la casuística de prorrata en el modelo 303 cuando se han +creado ya los apuntes contables separados con el módulo `l10n_es_vat_prorate`. + +Esto es necesario si se cuenta con el SII y se debe enviar la información ya +seccionada. + +Para el caso de que se quiera hacer la repartición con el asiento de liquidación +del IVA, utilizar `l10n_es_aeat_vat_prorrate`. diff --git a/l10n_es_aeat_mod303_vat_prorate/readme/USAGE.rst b/l10n_es_aeat_mod303_vat_prorate/readme/USAGE.rst new file mode 100644 index 00000000000..754cca4fd07 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/readme/USAGE.rst @@ -0,0 +1,3 @@ +#. Realizar la declaración 303 de la forma habitual. +#. El IVA deducible ya vendrá minorado por el porcentaje de la prorrata. +#. En la casilla 44, se mostrará el importe de la prorrata que se minoró. diff --git a/l10n_es_aeat_mod303_vat_prorate/static/description/icon.png b/l10n_es_aeat_mod303_vat_prorate/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a3a4799a7400d2e1988a39cb0de05f67b9fc5267 GIT binary patch literal 5861 zcmWky1yoc`6yB9uLApU&8U$2A+69y@>0CrQr4|&}UAhqjmhM=7r9)Cyq@-a%8kQ2N zrIe8R*LTj$oS8HCzW04MX6}pC*L^`w%0dbN0LV4eRSoeY{9gkR4q&=;&> z1j0YTpw}_@`CV^yb6@=anSTuk7RU+2FEab7nfbl+a`c1R`8WWeQ0PM!Pd8tCJ8y@F zUOrAaIC&NTfZ>&f>NBIj+|9h87P{UhG|a!%9oY+*7b;eKoe<8-Xt${R%-rh5TG$tU z^~vH`3D*P^b-MEuq4&FoC<%iX#Y~Jb5aA%z*k_3beLY;y*&K|Xu&e=q9bun7FLO*I zhw~OBF-w@o3ec;NmEhpd6+2UQJAVGA(@!fR(rCIsn4NnatrzLJiY6+Tji{t15_ zsdF#$eltxvHxl7)Iqk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T0@G&Q8zMR5pQW_?W_;ZV9OD#81!Dw1DGI*l*PbBizXJzm*JuqfEKyXdMA{d? z{{7)x`@AMg&$M-)M*Ek1S6wg`HVsgK$fl*EKTyo%`H{4YZL@s~ zcsIiawX90fbJzmpZY|QJn{+})<==7&CFZ`I^FZHZU!1vR%bp+*0a-wSExHPy8s`mM zWP?_ws)ylz_R9dkp)2Bc*UoP2`?vGPD;Y}0bGzn}Txk;q0UpG=#zb@sx4)9mq4i^L zBj6mAq4E-V=#p~ELEg^OEd{qhA)CNThDBo^m62iOg0@OZ^|Wdm0V-;3=hF&Aew6Jz zU`fDb^y0!7%Z?j3tmmu!Oi_t!QGSEXYq4iR6!afDSzV!HA8|DV?a@njjqL!ZlykI! zRDa~fPS+)YGbLA~OOoZwUtn?bQ-TlLnKuDDe@9iTo(*>g6>#4+P;V|TKi#7MU6#aC z;F906a>QmM&zj|U<2Ac$L7SSJZp-dsPx1(Y$>@>etWEXj5`$V>(uRZ5A%i%l-OzhG qM4u`D!!)1_iq)VVh1)Z+w + + + + + +Prorrata de IVA [303] + + + +
+

Prorrata de IVA [303]

+ + +

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

+

Este módulo contempla la casuística de prorrata en el modelo 303 cuando se han +creado ya los apuntes contables separados con el módulo l10n_es_vat_prorate.

+

Esto es necesario si se cuenta con el SII y se debe enviar la información ya +seccionada.

+

Para el caso de que se quiera hacer la repartición con el asiento de liquidación +del IVA, utilizar l10n_es_aeat_vat_prorrate.

+

Table of contents

+ +
+

Configuration

+
+Para entender el funcionamiento de la prorrata, remitirse a la configuración de +l10n_es_aeat_vat_prorate.
+
+
+

Usage

+
    +
  1. Realizar la declaración 303 de la forma habitual.
  2. +
  3. El IVA deducible ya vendrá minorado por el porcentaje de la prorrata.
  4. +
  5. En la casilla 44, se mostrará el importe de la prorrata que se minoró.
  6. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa
      +
    • Pedro M. Baeza
    • +
    • Víctor Martínez
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainer:

+

victoralmau

+

This module is part of the OCA/l10n-spain project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_es_aeat_mod303_vat_prorate/tests/__init__.py b/l10n_es_aeat_mod303_vat_prorate/tests/__init__.py new file mode 100644 index 00000000000..456da60679e --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/tests/__init__.py @@ -0,0 +1 @@ +from . import test_l10n_es_aeat_mod303_vat_prorate diff --git a/l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py b/l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py new file mode 100644 index 00000000000..4b35f132527 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py @@ -0,0 +1,40 @@ +# Copyright 2023 Tecnativa - Víctor Martínez +# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0 + +from odoo.addons.l10n_es_aeat_mod303.tests.test_l10n_es_aeat_mod303 import ( + TestL10nEsAeatMod303Base, +) + + +class TestL10nEsAeatMod303VatProrate(TestL10nEsAeatMod303Base): + taxes_sale = { + # tax code: (base, tax_amount) + "S_IVA21B": (1000, 0), + } + + def test_model_303_without_prorate(self): + self._invoice_sale_create("2017-01-11") + self.model303.button_calculate() + self.assertEqual(self.model303.total_devengado, 210) + self.assertEqual(self.model303.total_deducir, 0) + self.assertEqual(self.model303.resultado_liquidacion, 210) + + def test_model_303_with_prorate(self): + # Set vat prorate configuration from company and taxes + self.company.write( + { + "with_vat_prorate": True, + "vat_prorate_ids": [ + (0, 0, {"date": "2017-01-01", "vat_prorate": 99}), + ], + } + ) + for desc, _values in self.taxes_sale.items(): + taxes = self._get_taxes(desc.split("//")[0]) + taxes.with_vat_prorate = True + # Create invoice + calculate 303 + self._invoice_sale_create("2017-01-11") + self.model303.button_calculate() + self.assertEqual(self.model303.total_devengado, 210) + self.assertEqual(self.model303.total_deducir, 207.9) + self.assertEqual(self.model303.resultado_liquidacion, 2.1) From ccf124748642214c6642a58add6f8ed5375470d7 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 17 Mar 2023 19:16:13 +0100 Subject: [PATCH 02/37] [FIX] l10n_es_aeat_mod303_vat_prorate: Adjust it to the specifications --- l10n_es_aeat_mod303_vat_prorate/README.rst | 25 ++++- .../__manifest__.py | 9 +- .../2023/aeat.model.export.config.line.csv | 2 + l10n_es_aeat_mod303_vat_prorate/i18n/es.po | 73 +++++++++++- .../i18n/l10n_es_aeat_mod303_vat_prorate.pot | 58 +++++++++- .../models/mod303.py | 105 ++++++++++++++++-- .../readme/ROADMAP.rst | 3 + .../static/description/index.html | 55 +++++---- .../test_l10n_es_aeat_mod303_vat_prorate.py | 56 ++++++++-- .../views/mod303_views.xml | 36 ++++++ 10 files changed, 362 insertions(+), 60 deletions(-) create mode 100644 l10n_es_aeat_mod303_vat_prorate/data/2023/aeat.model.export.config.line.csv create mode 100644 l10n_es_aeat_mod303_vat_prorate/readme/ROADMAP.rst create mode 100644 l10n_es_aeat_mod303_vat_prorate/views/mod303_views.xml diff --git a/l10n_es_aeat_mod303_vat_prorate/README.rst b/l10n_es_aeat_mod303_vat_prorate/README.rst index 9b1bcc904e2..ceebfbd3014 100644 --- a/l10n_es_aeat_mod303_vat_prorate/README.rst +++ b/l10n_es_aeat_mod303_vat_prorate/README.rst @@ -2,10 +2,13 @@ Prorrata de IVA [303] ===================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:2708bb797c1ce17c7b070ebfac506b40f5ed10543ff7435a54510a54a005e0c8 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -20,10 +23,10 @@ Prorrata de IVA [303] :target: https://translation.odoo-community.org/projects/l10n-spain-14-0/l10n-spain-14-0-l10n_es_aeat_mod303_vat_prorate :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/l10n-spain&target_branch=14.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=14.0 :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| Este módulo contempla la casuística de prorrata en el modelo 303 cuando se han creado ya los apuntes contables separados con el módulo `l10n_es_vat_prorate`. @@ -52,12 +55,19 @@ Usage #. El IVA deducible ya vendrá minorado por el porcentaje de la prorrata. #. En la casilla 44, se mostrará el importe de la prorrata que se minoró. +Known issues / Roadmap +====================== + +* La prorrata especial de IVA no está contemplada. +* No se incluye la posibilidad de las facturas de actividad diferenciada, de las + que te puedes deducir el 100% del IVA de la factura. + Bug Tracker =========== Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -94,10 +104,13 @@ promote its widespread use. .. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px :target: https://github.com/victoralmau :alt: victoralmau +.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px + :target: https://github.com/pedrobaeza + :alt: pedrobaeza -Current `maintainer `__: +Current `maintainers `__: -|maintainer-victoralmau| +|maintainer-victoralmau| |maintainer-pedrobaeza| This module is part of the `OCA/l10n-spain `_ project on GitHub. diff --git a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py index 0697f35210d..d5626892808 100644 --- a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py +++ b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py @@ -1,13 +1,18 @@ # Copyright 2023 Tecnativa - Víctor Martínez +# Copyright 2023 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Prorrata de IVA [303]", "version": "14.0.1.0.0", - "category": "Human Resources", + "category": "Accounting", "website": "https://github.com/OCA/l10n-spain", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "depends": ["l10n_es_vat_prorate", "l10n_es_aeat_mod303"], + "data": [ + "data/2023/aeat.model.export.config.line.csv", + "views/mod303_views.xml", + ], "installable": True, - "maintainers": ["victoralmau"], + "maintainers": ["victoralmau", "pedrobaeza"], } diff --git a/l10n_es_aeat_mod303_vat_prorate/data/2023/aeat.model.export.config.line.csv b/l10n_es_aeat_mod303_vat_prorate/data/2023/aeat.model.export.config.line.csv new file mode 100644 index 00000000000..b2626de505c --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/data/2023/aeat.model.export.config.line.csv @@ -0,0 +1,2 @@ +"id","export_config_id:id","sequence","name","export_type","size","decimal_size","alignment","apply_sign","negative_sign","positive_sign","bool_no","bool_yes","expression","fixed_value","conditional_expression","repeat_expression","subconfig_id/id" +"l10n_es_aeat_mod303.aeat_mod303_2023_sub01_export_line_77","l10n_es_aeat_mod303.aeat_mod303_2023_sub01_export_config",77,"Liquidación: Regimen General - IVA Deducible - Regularización por aplicación del porcentaje definitivo de prorrata - Cuota [44]","float",17,2,"right",1,"N",0," ","X","${object.casilla_44}",,,, diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/es.po b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po index 8317a58eaeb..4378eb410da 100644 --- a/l10n_es_aeat_mod303_vat_prorate/i18n/es.po +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po @@ -6,20 +6,27 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-14 08:58+0000\n" -"PO-Revision-Date: 2023-03-14 08:58+0000\n" +"POT-Creation-Date: 2023-03-17 20:07+0000\n" +"PO-Revision-Date: 2023-03-17 21:09+0100\n" "Last-Translator: \n" "Language-Team: \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"X-Generator: Poedit 3.0.1\n" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model,name:l10n_es_aeat_mod303_vat_prorate.model_l10n_es_aeat_mod303_report msgid "AEAT 303 Report" msgstr "Modelo AEAT 303" +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__vat_prorate_percent +msgid "Definitive VAT prorate percentage" +msgstr "Porcentaje definitivo de prorrata" + #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__display_name msgid "Display Name" @@ -28,9 +35,67 @@ msgstr "Nombre a mostrar" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__id msgid "ID" -msgstr "" +msgstr "ID" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report____last_update msgid "Last Modified on" msgstr "Última modificación en" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_account_id +msgid "Prorate regularization account" +msgstr "Cuenta de regularización de prorrata" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_analytic_account_id +msgid "Prorate regularization analytic account" +msgstr "Cuenta analítica de regularización de prorrata" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__casilla_44 +msgid "Regularización por aplicación del porcentaje definitivo de prorrata." +msgstr "Regularización por aplicación del porcentaje definitivo de prorrata." + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_account_id +msgid "" +"This account will be the one where charging the regularization of the VAT " +"prorate." +msgstr "" +"Esta cuenta será la usada cuando se añada la regularización de prorrata al " +"asiento." + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_analytic_account_id +msgid "" +"This analytic account will be the one where charging the regularization of " +"the VAT prorate." +msgstr "" +"Esta cuenta analítica será la usada cuando se añada la regularización de " +"prorrata al asiento." + +#. module: l10n_es_aeat_mod303_vat_prorate +#: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 +#, python-format +msgid "VAT prorate percent must be between 0.01 and 100" +msgstr "El porcentaje de prorrata debe estar entre 0.01 y 100" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 +#, python-format +msgid "VAT prorate regularization" +msgstr "Regularización de prorrata de IVA" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__with_vat_prorate +msgid "With Vat Prorate" +msgstr "Con prorrata de IVA" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__casilla_44 +msgid "[44] Regularización de la prorrata" +msgstr "" + +#~ msgid "[44] Prorate regularization" +#~ msgstr "[44] Regularización de prorrata" diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot index 2d7da7ea230..f442828d0d8 100644 --- a/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot @@ -6,8 +6,6 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-14 08:57+0000\n" -"PO-Revision-Date: 2023-03-14 08:57+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -20,6 +18,11 @@ msgstr "" msgid "AEAT 303 Report" msgstr "" +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__vat_prorate_percent +msgid "Definitive VAT prorate percentage" +msgstr "" + #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__display_name msgid "Display Name" @@ -34,3 +37,54 @@ msgstr "" #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report____last_update msgid "Last Modified on" msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_account_id +msgid "Prorate regularization account" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_analytic_account_id +msgid "Prorate regularization analytic account" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__casilla_44 +msgid "Regularización por aplicación del porcentaje definitivo de prorrata." +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_account_id +msgid "" +"This account will be the one where charging the regularization of the VAT " +"prorate." +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_analytic_account_id +msgid "" +"This analytic account will be the one where charging the regularization of " +"the VAT prorate." +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 +#, python-format +msgid "VAT prorate percent must be between 0.01 and 100" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 +#, python-format +msgid "VAT prorate regularization" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__with_vat_prorate +msgid "With Vat Prorate" +msgstr "" + +#. module: l10n_es_aeat_mod303_vat_prorate +#: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__casilla_44 +msgid "[44] Regularización de la prorrata" +msgstr "" diff --git a/l10n_es_aeat_mod303_vat_prorate/models/mod303.py b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py index 1c6d61d16aa..a6331bd71b1 100644 --- a/l10n_es_aeat_mod303_vat_prorate/models/mod303.py +++ b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py @@ -1,27 +1,108 @@ # Copyright 2023 Tecnativa - Víctor Martínez +# Copyright 2023 Tecnativa - Pedro M. Baeza # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0 -from odoo import models +from odoo import _, api, exceptions, fields, models class L10nEsAeatMod303Report(models.Model): _inherit = "l10n.es.aeat.mod303.report" - def get_taxes_from_map(self, map_line): - if map_line.field_number == 44 and self.company_id.with_vat_prorate: - return self.env["account.tax"].search( + casilla_44 = fields.Float( + string="[44] Prorate regularization", + default=0, + states={"done": [("readonly", True)]}, + help="Regularización por aplicación del porcentaje definitivo de prorrata.", + ) + with_vat_prorate = fields.Boolean(related="company_id.with_vat_prorate") + vat_prorate_percent = fields.Float( + string="Definitive VAT prorate percentage", + default=100, + readonly=True, + states={"draft": [("readonly", False)]}, + ) + prorate_account_id = fields.Many2one( + comodel_name="account.account", + string="Prorate regularization account", + help="This account will be the one where charging the regularization of the VAT" + " prorate.", + readonly=True, + states={"calculated": [("readonly", False)]}, + ) + prorate_analytic_account_id = fields.Many2one( + comodel_name="account.analytic.account", + string="Prorate regularization analytic account", + help="This analytic account will be the one where charging the regularization " + "of the VAT prorate.", + readonly=True, + states={"calculated": [("readonly", False)]}, + ) + + @api.constrains("vat_prorate_percent") + def check_vat_prorate_percent(self): + if not (0 < self.vat_prorate_percent <= 100): + raise exceptions.ValidationError( + _("VAT prorate percent must be between 0.01 and 100") + ) + + def _calculate_casilla_44_mod303_vat_prorate(self): + self.ensure_one() + theoretical_prorate = self.company_id.get_prorate(self.date_start) + diff_perc = self.vat_prorate_percent - theoretical_prorate + if not diff_perc: + return + result = 0 + # Get the difference for the previous reports + prev_reports = self._get_previous_fiscalyear_reports(self.date_start) + for report in prev_reports: + result += diff_perc * report.total_deducir / theoretical_prorate + # Get the diff for this declaration (the last of the year) + diff_amount = round(diff_perc * self.total_deducir / theoretical_prorate, 2) + result += diff_amount + # Change the amount to deduce and set field 44 + self.total_deducir += diff_amount + self.casilla_44 = round(result, 2) + + def calculate(self): + """Calculate the field 44 according the definitive one and adjust results.""" + res = super().calculate() + for report in self: + report.casilla_44 = 0 + if report.period_type not in {"4T", "12"} or not report.with_vat_prorate: + continue + report._calculate_casilla_44_mod303_vat_prorate() + account_number = "6391%" if report.casilla_44 >= 0 else "6341%" + # Choose default account according result + report.prorate_account_id = self.env["account.account"].search( [ - ("company_id", "=", self.company_id.id), - ("with_vat_prorate", "=", True), - ] + ("code", "like", account_number), + ("company_id", "=", report.company_id.id), + ], + limit=1, ) - return super().get_taxes_from_map(map_line) + return res def _get_move_line_domain(self, date_start, date_end, map_line): - """Se define el importe de la prorata para la casilla 44. - Ejemplo: 10€ y prorata del 99%, se devolverá 9.9 - """ + """Restrict the deductible taxes to the lines that are not prorate ones.""" res = super()._get_move_line_domain(date_start, date_end, map_line) - if map_line.field_number == 44 and self.company_id.with_vat_prorate: + if ( + map_line.field_number in {29, 33, 35, 37, 39, 41} + and self.company_id.with_vat_prorate + ): res += [("vat_prorate", "=", False)] return res + + def _prepare_regularization_extra_move_lines(self): + """Add the amount of the regularization to the liquidation entry.""" + lines = super()._prepare_regularization_extra_move_lines() + if self.casilla_44 and self.with_vat_prorate: + lines.append( + { + "name": _("VAT prorate regularization"), + "account_id": self.prorate_account_id.id, + "analytic_account_id": self.prorate_analytic_account_id.id, + "debit": -self.casilla_44 if self.casilla_44 < 0 else 0.0, + "credit": self.casilla_44 if self.casilla_44 > 0 else 0.0, + } + ) + return lines diff --git a/l10n_es_aeat_mod303_vat_prorate/readme/ROADMAP.rst b/l10n_es_aeat_mod303_vat_prorate/readme/ROADMAP.rst new file mode 100644 index 00000000000..d52e8941d6b --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* La prorrata especial de IVA no está contemplada. +* No se incluye la posibilidad de las facturas de actividad diferenciada, de las + que te puedes deducir el 100% del IVA de la factura. diff --git a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html index 0efc8e6a801..bc3bbeec062 100644 --- a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html +++ b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html @@ -1,20 +1,20 @@ - + - + Prorrata de IVA [303] -
-

Prorrata de IVA [303]

+
+ + +Odoo Community Association + +
+

Prorrata de IVA [303]

-

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

Este módulo contempla la casuística de prorrata en el modelo 303 cuando se han creado ya los apuntes contables separados con el módulo l10n_es_vat_prorate.

@@ -391,12 +396,12 @@

Prorrata de IVA [303]

-

Configuration

+

Configuration

Para entender el funcionamiento de la prorrata, remitirse a la configuración de l10n_es_vat_prorate.

-

Usage

+

Usage

  1. Realizar la declaración 303 de la forma habitual.
  2. El IVA deducible ya vendrá minorado por el porcentaje de la prorrata.
  3. @@ -412,7 +417,7 @@

    Usage

-

Known issues / Roadmap

+

Known issues / Roadmap

  • No se incluye la posibilidad de las facturas de actividad diferenciada, de las que te puedes deducir el 100% del IVA de la @@ -420,7 +425,7 @@

    Known issues / Roadmap

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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 @@ -428,15 +433,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Tecnativa
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -474,5 +479,6 @@

Maintainers

+
From 5a967d224005222bf494e47edf10c9536028f36c Mon Sep 17 00:00:00 2001 From: Andrii Kompaniiets Date: Thu, 8 Jan 2026 12:48:33 +0100 Subject: [PATCH 28/37] [FIX] l10n_es_aeat_mod303_vat_prorate: error ZeroDivisionError MT-13250 --- l10n_es_aeat_mod303_vat_prorate/i18n/es.po | 30 ++++++++++++++----- .../i18n/l10n_es_aeat_mod303_vat_prorate.pot | 10 +++++++ .../models/mod303.py | 8 +++++ 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/es.po b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po index e4f404d292f..f1d961da7de 100644 --- a/l10n_es_aeat_mod303_vat_prorate/i18n/es.po +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po @@ -6,22 +6,27 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-17 20:07+0000\n" -"PO-Revision-Date: 2024-09-02 11:06+0000\n" -"Last-Translator: Alberto Martínez \n" +"POT-Creation-Date: 2026-01-12 11:25+0000\n" +"PO-Revision-Date: 2026-01-12 13:16+0100\n" +"Last-Translator: Andrii Kompaniiets \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" +"X-Generator: Poedit 3.6\n" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model,name:l10n_es_aeat_mod303_vat_prorate.model_l10n_es_aeat_mod303_report msgid "AEAT 303 Report" msgstr "Modelo AEAT 303" +#. module: l10n_es_aeat_mod303_vat_prorate +#: model_terms:ir.ui.view,arch_db:l10n_es_aeat_mod303_vat_prorate.l10n_es_aeat_mod303_prorrata_form +msgid "Calcular prorrata definitiva" +msgstr "" + #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__vat_prorate_percent msgid "Definitive VAT prorate percentage" @@ -29,7 +34,10 @@ msgstr "Porcentaje definitivo de prorrata" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__with_vat_prorate -msgid "If this option is enabled, all invoice lineswith VAT will be prorated" +#, fuzzy +#| msgid "" +#| "If this option is enabled, all invoice lineswith VAT will be prorated" +msgid "If this option is enabled, all invoice lines with VAT will be prorated" msgstr "" "Si esta opción está establecida, todas las líneas de facturas con IVA serán " "prorrateadas" @@ -39,6 +47,16 @@ msgstr "" msgid "Prorate" msgstr "Prorrata" +#. module: l10n_es_aeat_mod303_vat_prorate +#. odoo-python +#: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 +msgid "" +"Prorate percentage not found, or it's 0. Please review the company's prorate " +"adjustments." +msgstr "" +"No se encuentra porcentaje de prorrata o es 0. Por favor, revise los ajustes " +"de prorrata de la compañía." + #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_account_id msgid "Prorate regularization account" @@ -75,14 +93,12 @@ msgstr "" #. module: l10n_es_aeat_mod303_vat_prorate #. odoo-python #: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 -#, python-format msgid "VAT prorate percent must be between 0.00 and 100" msgstr "El porcentaje de prorrata de IVA debe estar entre 0.00 y 100" #. module: l10n_es_aeat_mod303_vat_prorate #. odoo-python #: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 -#, python-format msgid "VAT prorate regularization" msgstr "Regularización de prorrata de IVA" diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot index 3b69ba6f7c1..86ecbbadebc 100644 --- a/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot @@ -6,6 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-01-12 11:25+0000\n" +"PO-Revision-Date: 2026-01-12 11:25+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -38,6 +40,14 @@ msgstr "" msgid "Prorate" msgstr "" +#. module: l10n_es_aeat_mod303_vat_prorate +#. odoo-python +#: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 +msgid "" +"Prorate percentage not found, or it's 0. Please review the company's prorate" +" adjustments." +msgstr "" + #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_account_id msgid "Prorate regularization account" diff --git a/l10n_es_aeat_mod303_vat_prorate/models/mod303.py b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py index ac8c89be3ed..67999355f36 100644 --- a/l10n_es_aeat_mod303_vat_prorate/models/mod303.py +++ b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py @@ -8,6 +8,7 @@ import re from odoo import _, api, exceptions, fields, models +from odoo.tools import float_is_zero class L10nEsAeatMod303Report(models.Model): @@ -72,6 +73,13 @@ def check_vat_prorate_percent(self): def _general_prorate_method(self): self.ensure_one() theoretical_prorate = self.prorate_id.vat_prorate + if float_is_zero(theoretical_prorate, precision_digits=2): + raise exceptions.ValidationError( + self.env._( + "Prorate percentage not found, or it's 0. " + "Please review the company's prorate adjustments." + ) + ) diff_perc = self.vat_prorate_percent - theoretical_prorate if not diff_perc: return From 12883e8327ce6a87e7e4da44a17be3d5684279b9 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 12 Jan 2026 18:34:55 +0000 Subject: [PATCH 29/37] [UPD] Update l10n_es_aeat_mod303_vat_prorate.pot --- .../i18n/l10n_es_aeat_mod303_vat_prorate.pot | 2 -- 1 file changed, 2 deletions(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot index 86ecbbadebc..b2b9476b08b 100644 --- a/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/l10n_es_aeat_mod303_vat_prorate.pot @@ -6,8 +6,6 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-12 11:25+0000\n" -"PO-Revision-Date: 2026-01-12 11:25+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" From 764a95ba0265911f62e591e57f98cf238d8c95bc Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 12 Jan 2026 18:50:23 +0000 Subject: [PATCH 30/37] [BOT] post-merge updates --- l10n_es_aeat_mod303_vat_prorate/README.rst | 2 +- l10n_es_aeat_mod303_vat_prorate/__manifest__.py | 2 +- l10n_es_aeat_mod303_vat_prorate/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/README.rst b/l10n_es_aeat_mod303_vat_prorate/README.rst index 704fc38c4a2..b5fccedda3e 100644 --- a/l10n_es_aeat_mod303_vat_prorate/README.rst +++ b/l10n_es_aeat_mod303_vat_prorate/README.rst @@ -11,7 +11,7 @@ Prorrata de IVA [303] !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e378eb51047dd4787d1e03c5b8120d672ec9246da98c1ac86742bc8a8385a24d + !! source digest: sha256:cc56ee749ab34427a6f99e05fc679a29414aa36706dc568e05acd702d6477063 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py index 516e1d77ff6..7ec3604810a 100644 --- a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py +++ b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Prorrata de IVA [303]", - "version": "18.0.1.0.0", + "version": "18.0.1.0.1", "category": "Accounting", "website": "https://github.com/OCA/l10n-spain", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html index c39c84265d8..473e4a4d736 100644 --- a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html +++ b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html @@ -372,7 +372,7 @@

Prorrata de IVA [303]

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:e378eb51047dd4787d1e03c5b8120d672ec9246da98c1ac86742bc8a8385a24d +!! source digest: sha256:cc56ee749ab34427a6f99e05fc679a29414aa36706dc568e05acd702d6477063 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

Este módulo contempla la casuística de prorrata en el modelo 303 cuando From 8a658d6c7322adebc292a5309701eb30b82f959b Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 12 Jan 2026 19:22:06 +0000 Subject: [PATCH 31/37] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-spain-18.0/l10n-spain-18.0-l10n_es_aeat_mod303_vat_prorate Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-18-0/l10n-spain-18-0-l10n_es_aeat_mod303_vat_prorate/ --- l10n_es_aeat_mod303_vat_prorate/i18n/ca.po | 25 +++++++++++++++++----- l10n_es_aeat_mod303_vat_prorate/i18n/es.po | 2 -- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/ca.po b/l10n_es_aeat_mod303_vat_prorate/i18n/ca.po index 7189da0137e..739cf15600c 100644 --- a/l10n_es_aeat_mod303_vat_prorate/i18n/ca.po +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/ca.po @@ -21,6 +21,11 @@ msgstr "" msgid "AEAT 303 Report" msgstr "Declaration AEAT 303" +#. module: l10n_es_aeat_mod303_vat_prorate +#: model_terms:ir.ui.view,arch_db:l10n_es_aeat_mod303_vat_prorate.l10n_es_aeat_mod303_prorrata_form +msgid "Calcular prorrata definitiva" +msgstr "" + #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__vat_prorate_percent msgid "Definitive VAT prorate percentage" @@ -28,16 +33,22 @@ msgstr "Percentatge de prorrateig d'IVA definitiu" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__with_vat_prorate -msgid "If this option is enabled, all invoice lineswith VAT will be prorated" +msgid "If this option is enabled, all invoice lines with VAT will be prorated" msgstr "" -"Si aquesta opció està activada, es prorratejaran totes les línies de factura " -"amb IVA" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_id msgid "Prorate" msgstr "Prorrateig" +#. module: l10n_es_aeat_mod303_vat_prorate +#. odoo-python +#: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 +msgid "" +"Prorate percentage not found, or it's 0. Please review the company's prorate " +"adjustments." +msgstr "" + #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__prorate_account_id msgid "Prorate regularization account" @@ -73,14 +84,12 @@ msgstr "" #. module: l10n_es_aeat_mod303_vat_prorate #. odoo-python #: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 -#, python-format msgid "VAT prorate percent must be between 0.00 and 100" msgstr "El percentatge de prorrateig de l'IVA ha d'estar entre 0,00 i 100" #. module: l10n_es_aeat_mod303_vat_prorate #. odoo-python #: code:addons/l10n_es_aeat_mod303_vat_prorate/models/mod303.py:0 -#, python-format msgid "VAT prorate regularization" msgstr "VAT prorrateig regularization" @@ -98,3 +107,9 @@ msgstr "Amb prorrateig d'IVA" #: model:ir.model.fields,field_description:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__casilla_44 msgid "[44] Prorate regularization" msgstr "[44] Prorrateig regularització" + +#~ msgid "" +#~ "If this option is enabled, all invoice lineswith VAT will be prorated" +#~ msgstr "" +#~ "Si aquesta opció està activada, es prorratejaran totes les línies de " +#~ "factura amb IVA" diff --git a/l10n_es_aeat_mod303_vat_prorate/i18n/es.po b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po index f1d961da7de..8a738f00b88 100644 --- a/l10n_es_aeat_mod303_vat_prorate/i18n/es.po +++ b/l10n_es_aeat_mod303_vat_prorate/i18n/es.po @@ -35,8 +35,6 @@ msgstr "Porcentaje definitivo de prorrata" #. module: l10n_es_aeat_mod303_vat_prorate #: model:ir.model.fields,help:l10n_es_aeat_mod303_vat_prorate.field_l10n_es_aeat_mod303_report__with_vat_prorate #, fuzzy -#| msgid "" -#| "If this option is enabled, all invoice lineswith VAT will be prorated" msgid "If this option is enabled, all invoice lines with VAT will be prorated" msgstr "" "Si esta opción está establecida, todas las líneas de facturas con IVA serán " From e78a6f7fac01ba5b6a80a3d0723bc802f14ddf71 Mon Sep 17 00:00:00 2001 From: christian-ramos-tecnativa Date: Wed, 14 Jan 2026 18:05:07 +0000 Subject: [PATCH 32/37] [FIX] l10n_es_aeat_mod303_vat_prorate: Add other exempt taxes --- .../models/mod303.py | 9 ++- .../test_l10n_es_aeat_mod303_vat_prorate.py | 63 +++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/models/mod303.py b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py index 67999355f36..b955b4a81f2 100644 --- a/l10n_es_aeat_mod303_vat_prorate/models/mod303.py +++ b/l10n_es_aeat_mod303_vat_prorate/models/mod303.py @@ -197,7 +197,14 @@ def button_compute(self): taxed = -sum(move_lines.mapped("balance")) # Get base amount of exempt operations mapline_vals["tax_xmlid_ids"] = [ - (4, self.env.ref("l10n_es_aeat_mod303.s_iva0").id) + (4, self.env.ref(f"l10n_es_aeat_mod303.{x}").id) + for x in [ + "s_iva0", + "s_iva0_art22", + "s_iva0_art23", + "s_iva0_nsd", + "s_iva0_ns", + ] ] map_line = MapLine.new(mapline_vals) move_lines = self._get_tax_lines(date_from, date_to, map_line) diff --git a/l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py b/l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py index 5a9fccb02b1..1056d3d1862 100644 --- a/l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py +++ b/l10n_es_aeat_mod303_vat_prorate/tests/test_l10n_es_aeat_mod303_vat_prorate.py @@ -237,3 +237,66 @@ def test_button_compute(self): self.model303.button_compute() self.assertEqual(self.model303.vat_prorate_percent, 67) self.assertEqual(self.model303.casilla_44, 0) + + def test_button_compute_other_exempt(self): + self.company.write( + { + "with_vat_prorate": True, + "vat_prorate_ids": [ + Command.create({"date": "2024-01-01", "vat_prorate": 10}) + ], + } + ) + self._invoice_purchase_create( + "2024-01-01", + { + "invoice_line_ids": [ + Command.create( + { + "name": "Compra 100€ + IVA 21%", + "account_id": self.accounts["600000"].id, + "price_unit": 100, + "quantity": 1, + "with_vat_prorate": True, + "tax_ids": [ + Command.link(t.id) + for t in self._get_taxes("P_IVA21_BC") + ], + } + ), + ] + }, + ) + self._invoice_sale_create( + "2024-01-01", + { + "invoice_line_ids": [ + Command.create( + { + "name": "Venta 200€ + IVA 21%", + "account_id": self.accounts["700000"].id, + "price_unit": 200, + "quantity": 1, + "tax_ids": [ + Command.link(t.id) for t in self._get_taxes("S_IVA21B") + ], + } + ), + Command.create( + { + "name": "Venta 100€ exento art. 22", + "account_id": self.accounts["700000"].id, + "price_unit": 100, + "quantity": 1, + "tax_ids": [ + Command.link(t.id) + for t in self._get_taxes("S_IVA0_ART22") + ], + } + ), + ] + }, + ) + self.model303.button_compute() + self.assertEqual(self.model303.vat_prorate_percent, 67) + self.assertEqual(self.model303.casilla_44, 0) From 53ed5dc846bd379497e395d74b7acd7aee6a9da6 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 14 Jan 2026 19:34:18 +0000 Subject: [PATCH 33/37] [BOT] post-merge updates --- l10n_es_aeat_mod303_vat_prorate/README.rst | 2 +- l10n_es_aeat_mod303_vat_prorate/__manifest__.py | 2 +- l10n_es_aeat_mod303_vat_prorate/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/README.rst b/l10n_es_aeat_mod303_vat_prorate/README.rst index b5fccedda3e..5b02ae90a51 100644 --- a/l10n_es_aeat_mod303_vat_prorate/README.rst +++ b/l10n_es_aeat_mod303_vat_prorate/README.rst @@ -11,7 +11,7 @@ Prorrata de IVA [303] !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:cc56ee749ab34427a6f99e05fc679a29414aa36706dc568e05acd702d6477063 + !! source digest: sha256:606c2dea30e3c96d575c3bd01aba34a50df190b66de1856afc5dd4c4173d89bc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py index 7ec3604810a..88b095d999f 100644 --- a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py +++ b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Prorrata de IVA [303]", - "version": "18.0.1.0.1", + "version": "18.0.1.0.2", "category": "Accounting", "website": "https://github.com/OCA/l10n-spain", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html index 473e4a4d736..c4cc413b947 100644 --- a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html +++ b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html @@ -372,7 +372,7 @@

Prorrata de IVA [303]

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:cc56ee749ab34427a6f99e05fc679a29414aa36706dc568e05acd702d6477063 +!! source digest: sha256:606c2dea30e3c96d575c3bd01aba34a50df190b66de1856afc5dd4c4173d89bc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

Este módulo contempla la casuística de prorrata en el modelo 303 cuando From 2d6f0c69388ca33efd0d8e7ecb3ab25a2962bb66 Mon Sep 17 00:00:00 2001 From: Andrii9090-tecnativa Date: Mon, 16 Feb 2026 10:01:28 +0100 Subject: [PATCH 34/37] [FIX] l10n_es_aeat_mod303_vat_prorate: Adjust it to the specifications 2026 TT60927 --- .../data/2026/aeat.model.export.config.line.csv | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 l10n_es_aeat_mod303_vat_prorate/data/2026/aeat.model.export.config.line.csv diff --git a/l10n_es_aeat_mod303_vat_prorate/data/2026/aeat.model.export.config.line.csv b/l10n_es_aeat_mod303_vat_prorate/data/2026/aeat.model.export.config.line.csv new file mode 100644 index 00000000000..2dd2f621705 --- /dev/null +++ b/l10n_es_aeat_mod303_vat_prorate/data/2026/aeat.model.export.config.line.csv @@ -0,0 +1,2 @@ +"id","export_config_id:id","sequence","name","export_type","size","decimal_size","alignment","apply_sign","negative_sign","positive_sign","bool_no","bool_yes","expression","fixed_value","conditional_expression","repeat_expression","subconfig_id/id" +"l10n_es_aeat_mod303.aeat_mod303_2026_02_sub01_export_line_84","l10n_es_aeat_mod303.aeat_mod303_2026_02_sub01_export_config",84,"Liquidación: Regimen General - IVA Deducible - Regularización por aplicación del porcentaje definitivo de prorrata - Cuota [44]","float",17,2,"right",1,"N",0," ","X","${object.casilla_44}",,,, From 714ba081837959f5acd395bda312a9bbb9a7e9c2 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 16 Feb 2026 18:54:14 +0000 Subject: [PATCH 35/37] [BOT] post-merge updates --- l10n_es_aeat_mod303_vat_prorate/README.rst | 2 +- l10n_es_aeat_mod303_vat_prorate/__manifest__.py | 2 +- l10n_es_aeat_mod303_vat_prorate/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/README.rst b/l10n_es_aeat_mod303_vat_prorate/README.rst index 5b02ae90a51..fa546d446f6 100644 --- a/l10n_es_aeat_mod303_vat_prorate/README.rst +++ b/l10n_es_aeat_mod303_vat_prorate/README.rst @@ -11,7 +11,7 @@ Prorrata de IVA [303] !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:606c2dea30e3c96d575c3bd01aba34a50df190b66de1856afc5dd4c4173d89bc + !! source digest: sha256:cdca009568fe7e71e668f405535a11f83c0022327e3c208aa16ff7929a671d6b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py index 88b095d999f..12e4bfde1df 100644 --- a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py +++ b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Prorrata de IVA [303]", - "version": "18.0.1.0.2", + "version": "18.0.1.1.0", "category": "Accounting", "website": "https://github.com/OCA/l10n-spain", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html index c4cc413b947..ee018d32d0c 100644 --- a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html +++ b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html @@ -372,7 +372,7 @@

Prorrata de IVA [303]

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:606c2dea30e3c96d575c3bd01aba34a50df190b66de1856afc5dd4c4173d89bc +!! source digest: sha256:cdca009568fe7e71e668f405535a11f83c0022327e3c208aa16ff7929a671d6b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

Este módulo contempla la casuística de prorrata en el modelo 303 cuando From c46af56b1ff38f2c04fb50c34d8bbf8abb6f2ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauricio=20Ist=C3=BAriz?= Date: Mon, 16 Mar 2026 14:16:48 -0400 Subject: [PATCH 36/37] [MIG] l10n_es_aeat_mod303_vat_prorate: Migration to 19.0 --- l10n_es_aeat_mod303_vat_prorate/README.rst | 10 +++++----- l10n_es_aeat_mod303_vat_prorate/__manifest__.py | 2 +- .../static/description/index.html | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/l10n_es_aeat_mod303_vat_prorate/README.rst b/l10n_es_aeat_mod303_vat_prorate/README.rst index fa546d446f6..a204459c4ef 100644 --- a/l10n_es_aeat_mod303_vat_prorate/README.rst +++ b/l10n_es_aeat_mod303_vat_prorate/README.rst @@ -21,13 +21,13 @@ Prorrata de IVA [303] :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/18.0/l10n_es_aeat_mod303_vat_prorate + :target: https://github.com/OCA/l10n-spain/tree/19.0/l10n_es_aeat_mod303_vat_prorate :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-18-0/l10n-spain-18-0-l10n_es_aeat_mod303_vat_prorate + :target: https://translation.odoo-community.org/projects/l10n-spain-19-0/l10n-spain-19-0-l10n_es_aeat_mod303_vat_prorate :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=18.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=19.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -77,7 +77,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -134,6 +134,6 @@ Current `maintainers `__: |maintainer-victoralmau| |maintainer-pedrobaeza| -This module is part of the `OCA/l10n-spain `_ project on GitHub. +This module is part of the `OCA/l10n-spain `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py index 12e4bfde1df..e78f530ec75 100644 --- a/l10n_es_aeat_mod303_vat_prorate/__manifest__.py +++ b/l10n_es_aeat_mod303_vat_prorate/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Prorrata de IVA [303]", - "version": "18.0.1.1.0", + "version": "19.0.1.0.0", "category": "Accounting", "website": "https://github.com/OCA/l10n-spain", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html index ee018d32d0c..db15ed357db 100644 --- a/l10n_es_aeat_mod303_vat_prorate/static/description/index.html +++ b/l10n_es_aeat_mod303_vat_prorate/static/description/index.html @@ -374,7 +374,7 @@

Prorrata de IVA [303]

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:cdca009568fe7e71e668f405535a11f83c0022327e3c208aa16ff7929a671d6b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/l10n-spain Translate me on Weblate Try me on Runboat

Este módulo contempla la casuística de prorrata en el modelo 303 cuando se han creado ya los apuntes contables separados con el módulo l10n_es_vat_prorate.

@@ -429,7 +429,7 @@

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -474,7 +474,7 @@

Maintainers

promote its widespread use.

Current maintainers:

victoralmau pedrobaeza

-

This module is part of the OCA/l10n-spain project on GitHub.

+

This module is part of the OCA/l10n-spain project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From b62029e85f948ab0994e7a1e5d75f244da2c96d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauricio=20Ist=C3=BAriz?= Date: Mon, 16 Mar 2026 15:05:28 -0400 Subject: [PATCH 37/37] [DON'T MERGE] test-requirements.txt --- test-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test-requirements.txt diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000000..1ddb513c7fe --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +odoo-addon-l10n_es_aeat_mod303 @ git+https://github.com/OCA/l10n-spain.git@refs/pull/4680/head#subdirectory=l10n_es_aeat_mod303 +odoo-addon-l10n_es_vat_prorate @ git+https://github.com/OCA/l10n-spain.git@refs/pull/4907/head#subdirectory=l10n_es_vat_prorate