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

[16.0][MIG] l10n_es_vat_book_oss: Migration to 16.0 #3516

Merged
merged 17 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions l10n_es_vat_book_oss/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
================
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/16.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-16-0/l10n-spain-16-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=16.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
=====

#. Vaya a *Contabilidad > Declaraciones AEAT > Libro de IVA*.
#. Cree un nuevo registro.
#. Escoja el periodo de tiempo para el libro.
#. 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:%2016.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/16.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": "16.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 15.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(self, report):
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(report)
if s_iva_map_line == self:
taxes += self.env["account.tax"].search(
[
("oss_country_id", "!=", False),
("company_id", "=", report.company_id.id),
]
)
return taxes
19 changes: 19 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,19 @@
# 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(L10nEsVatBook, self)._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/readme/CONFIGURE.rst
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.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Manuel Regidor <[email protected]>
1 change: 1 addition & 0 deletions l10n_es_vat_book_oss/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
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.rst
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.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#. Vaya a *Contabilidad > Declaraciones AEAT > Libro de IVA*.
#. Cree un nuevo registro.
#. Escoja el periodo de tiempo para el libro.
#. 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
Loading