Skip to content

Commit

Permalink
Merge PR #4010 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by HaraldPanten
  • Loading branch information
OCA-git-bot committed Feb 28, 2025
2 parents d4b43d2 + 54356b6 commit f350c77
Show file tree
Hide file tree
Showing 18 changed files with 844 additions and 0 deletions.
100 changes: 100 additions & 0 deletions l10n_es_vat_book_oss/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
================
Libro de IVA OSS
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a83488a292a2dbad1693329ad4f07ed16fb5f9caa2a8dfe83187824cf57a2004
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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_vat_book_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_vat_book_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 que tiene en cuenta los impuestos OSS en el cálculo del libro de
IVA.

**Table of contents**

.. contents::
:local:

Installation
============

Para instalar este modulo necesitas:

- l10n_es_vat_book
- l10n_eu_oss

Configuration
=============

Los impuestos OSS pueden verse en Contabilidad -> Configuración ->
Impuestos. Son aquellos que tienen el campo oss_country_id definido. No
es necesario incluir los impuestos en los mapeos del libro de IVA.

Usage
=====

1. Vaya a *Contabilidad > Declaraciones AEAT > Libro de IVA*.
2. Cree un nuevo registro.
3. Escoja el periodo de tiempo para el libro.
4. Pulse en "Calcular". Se tendrán en cuenta los impuestos OSS.

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

* Sygel

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

- Manuel Regidor <[email protected]>

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_vat_book_oss>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions l10n_es_vat_book_oss/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2021 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
15 changes: 15 additions & 0 deletions l10n_es_vat_book_oss/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Libro de IVA OSS",
"version": "17.0.1.0.0",
"development_status": "Beta",
"author": "Sygel, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-spain",
"license": "AGPL-3",
"category": "Accounting",
"depends": ["l10n_es_vat_book", "l10n_eu_oss_oca"],
"installable": True,
"autoinstall": True,
}
27 changes: 27 additions & 0 deletions l10n_es_vat_book_oss/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_vat_book_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-09 05:30+0000\n"
"Last-Translator: Ivorra78 <[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_vat_book_oss
#: model:ir.model,name:l10n_es_vat_book_oss.model_aeat_vat_book_map_line
msgid "AEAT Vat Book Map Line"
msgstr "Linea Mapeo libro de IVA AEAT"

#. module: l10n_es_vat_book_oss
#: model:ir.model,name:l10n_es_vat_book_oss.model_l10n_es_vat_book
msgid "Spanish VAT book report"
msgstr "Informe sobre el libro de IVA en español"
24 changes: 24 additions & 0 deletions l10n_es_vat_book_oss/i18n/l10n_es_vat_book_oss.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_vat_book_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_vat_book_oss
#: model:ir.model,name:l10n_es_vat_book_oss.model_aeat_vat_book_map_line
msgid "AEAT Vat Book Map Line"
msgstr ""

#. module: l10n_es_vat_book_oss
#: model:ir.model,name:l10n_es_vat_book_oss.model_l10n_es_vat_book
msgid "Spanish VAT book report"
msgstr ""
5 changes: 5 additions & 0 deletions l10n_es_vat_book_oss/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2021 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import l10n_es_vat_book
from . import aeat_vat_book_map_lines
21 changes: 21 additions & 0 deletions l10n_es_vat_book_oss/models/aeat_vat_book_map_lines.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2021 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class AeatVatBookMapLines(models.Model):
_inherit = "aeat.vat.book.map.line"

def get_taxes_for_company(self, company):
self.ensure_one()
s_iva_map_line = self.env.ref("l10n_es_vat_book.aeat_vat_book_map_line_s_iva")
taxes = super().get_taxes_for_company(company)
if s_iva_map_line == self:
taxes += self.env["account.tax"].search(
[
("oss_country_id", "!=", False),
("company_id", "=", company.id),
]
)
return taxes
17 changes: 17 additions & 0 deletions l10n_es_vat_book_oss/models/l10n_es_vat_book.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2021 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class L10nEsVatBook(models.Model):
_inherit = "l10n.es.vat.book"

def _prepare_book_line_tax_vals(self, move_line, vat_book_line):
values = super()._prepare_book_line_tax_vals(move_line, vat_book_line)
oss_taxes = self.env["account.tax"].search(
[("oss_country_id", "!=", False), ("company_id", "=", self.company_id.id)]
)
if move_line.tax_line_id in oss_taxes:
values.update({"tax_amount": 0, "total_amount": values.get("base_amount")})
return values
3 changes: 3 additions & 0 deletions l10n_es_vat_book_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"
3 changes: 3 additions & 0 deletions l10n_es_vat_book_oss/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Los impuestos OSS pueden verse en Contabilidad -\> Configuración -\>
Impuestos. Son aquellos que tienen el campo oss_country_id definido. No
es necesario incluir los impuestos en los mapeos del libro de IVA.
1 change: 1 addition & 0 deletions l10n_es_vat_book_oss/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Manuel Regidor \<<[email protected]>\>
2 changes: 2 additions & 0 deletions l10n_es_vat_book_oss/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Módulo que tiene en cuenta los impuestos OSS en el cálculo del libro de
IVA.
4 changes: 4 additions & 0 deletions l10n_es_vat_book_oss/readme/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Para instalar este modulo necesitas:

- l10n_es_vat_book
- l10n_eu_oss
4 changes: 4 additions & 0 deletions l10n_es_vat_book_oss/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Vaya a *Contabilidad \> Declaraciones AEAT \> Libro de IVA*.
2. Cree un nuevo registro.
3. Escoja el periodo de tiempo para el libro.
4. Pulse en "Calcular". Se tendrán en cuenta los impuestos OSS.
Binary file added l10n_es_vat_book_oss/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f350c77

Please sign in to comment.