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 #3157

101 changes: 101 additions & 0 deletions l10n_es_vat_book_oss/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
================
Libro de IVA OSS
================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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/15.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-15-0/l10n-spain-15-0-l10n_es_vat_book_oss
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/189/15.0
:alt: Try me on Runbot

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

Known issues / Roadmap
======================

Por el momento no se han incluído tests.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_vat_book_oss%0Aversion:%2015.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 <manuel.regidor@sygel.es>

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/15.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 <manuel.regidor@sygel.es>
# 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 <manuel.regidor@sygel.es>
# 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"],
"installable": True,
"autoinstall": True,
}
26 changes: 26 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,26 @@
# 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"
"POT-Creation-Date: 2023-07-25 06:25+0000\n"
"PO-Revision-Date: 2023-07-25 06:25+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_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 <manuel.regidor@sygel.es>
# 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 <manuel.regidor@sygel.es>
# 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)

Check warning on line 13 in l10n_es_vat_book_oss/models/aeat_vat_book_map_lines.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_vat_book_oss/models/aeat_vat_book_map_lines.py#L11-L13

Added lines #L11 - L13 were not covered by tests
if s_iva_map_line == self:
taxes += self.env["account.tax"].search(

Check warning on line 15 in l10n_es_vat_book_oss/models/aeat_vat_book_map_lines.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_vat_book_oss/models/aeat_vat_book_map_lines.py#L15

Added line #L15 was not covered by tests
[
("oss_country_id", "!=", False),
("company_id", "=", report.company_id.id),
]
)
return taxes

Check warning on line 21 in l10n_es_vat_book_oss/models/aeat_vat_book_map_lines.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_vat_book_oss/models/aeat_vat_book_map_lines.py#L21

Added line #L21 was not covered by tests
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 <manuel.regidor@sygel.es>
# 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(

Check warning on line 11 in l10n_es_vat_book_oss/models/l10n_es_vat_book.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_vat_book_oss/models/l10n_es_vat_book.py#L11

Added line #L11 was not covered by tests
move_line, vat_book_line
)
oss_taxes = self.env["account.tax"].search(

Check warning on line 14 in l10n_es_vat_book_oss/models/l10n_es_vat_book.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_vat_book_oss/models/l10n_es_vat_book.py#L14

Added line #L14 was not covered by tests
[("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

Check warning on line 19 in l10n_es_vat_book_oss/models/l10n_es_vat_book.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_vat_book_oss/models/l10n_es_vat_book.py#L18-L19

Added lines #L18 - L19 were not covered by tests
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.
2 changes: 2 additions & 0 deletions l10n_es_vat_book_oss/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Manuel Regidor <manuel.regidor@sygel.es>
* Aiendry Sarkar <aiendry@aktivsoftware.com>
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
1 change: 1 addition & 0 deletions l10n_es_vat_book_oss/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Por el momento no se han incluído tests.
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