Skip to content

Commit

Permalink
Merge PR OCA#3487 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Mar 27, 2024
2 parents 4c65a6e + 43323a8 commit 3905c2a
Show file tree
Hide file tree
Showing 15 changed files with 423 additions and 0 deletions.
75 changes: 75 additions & 0 deletions l10n_es_ticketbai_oss/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
=======================
TicketBAI - OSS Support
=======================

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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

|badge1| |badge2|

Módulo para hacer compatible el envío de facturas Ticketbai con el OSS

Añade 2 campos nuevos en los impuestos (account.tax):

* Tipo de causa de no sujeción (se añade el tipo IE)
* Tipo de impuesto Ticketbai

A la hora de generar el fichero XML de envío a TicketBai, si estos campos están rellenados,
se tendrán en cuenta dichos campos, sino seguirá el flujo normal como hasta ahora.


**Table of contents**

.. contents::
:local:

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

Para instalar este módulo se necesita:

#. Los módulos l10n_es_ticketbai

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_ticketbai_oss%0Aversion:%2012.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
~~~~~~~

* Binovo IT Human Project S.L.

Contributors
~~~~~~~~~~~~

* Alicia Rodríguez <[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/12.0/l10n_es_ticketbai_oss>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions l10n_es_ticketbai_oss/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions l10n_es_ticketbai_oss/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2024 Binovo IT Human Project SL
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "TicketBAI - OSS Support ",
"version": "12.0.1.0.0",
"category": "Accounting & Finance",
"website": "https://github.com/OCA/l10n-spain",
"author": "Binovo,"
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"development_status": "Alpha",
"maintainers": ["Binovo"],
"depends": ["l10n_es_ticketbai"],
"data": ["views/account_tax_views.xml"],
"application": False,
"installable": True,
"auto_install": False,
}
78 changes: 78 additions & 0 deletions l10n_es_ticketbai_oss/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_ticketbai_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-11 08:38+0000\n"
"PO-Revision-Date: 2024-03-11 08:38+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_ticketbai_oss
#: selection:tbai.invoice.tax,not_subject_to_cause:0
msgid "IE"
msgstr ""

#. module: l10n_es_ticketbai_oss
#: selection:account.tax,not_subject_to_cause:0
msgid "IE - No sujeto en el TAI por reglas de localización, pero repercute impuesto extranjero, IPS/IGIC o IVA de otro estado miembro UE."
msgstr "IE - No sujeto en el TAI por reglas de localización, pero repercute impuesto extranjero, IPS/IGIC o IVA de otro estado miembro UE."

#. module: l10n_es_ticketbai_oss
#: model:ir.model,name:l10n_es_ticketbai_oss.model_account_invoice_tax
msgid "Invoice Tax"
msgstr "Impuesto de factura"

#. module: l10n_es_ticketbai_oss
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_account_tax__not_subject_to_cause
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_tbai_invoice_tax__not_subject_to_cause
msgid "Not Subject to Cause"
msgstr "Causa no sujeta"

#. module: l10n_es_ticketbai_oss
#: selection:tbai.invoice.tax,not_subject_to_cause:0
msgid "OT"
msgstr ""

#. module: l10n_es_ticketbai_oss
#: selection:account.tax,not_subject_to_cause:0
msgid "OT - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no sujeción. "
msgstr ""

#. module: l10n_es_ticketbai_oss
#: selection:tbai.invoice.tax,not_subject_to_cause:0
msgid "RL"
msgstr ""

#. module: l10n_es_ticketbai_oss
#: selection:account.tax,not_subject_to_cause:0
msgid "RL - No sujeto por reglas de localización."
msgstr ""

#. module: l10n_es_ticketbai_oss
#: model:ir.model,name:l10n_es_ticketbai_oss.model_account_tax
msgid "Tax"
msgstr "Impuesto"

#. module: l10n_es_ticketbai_oss
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_account_tax__tbai_tax_map_id
msgid "Tbai Tax Map"
msgstr "Tipo impuesto TicketBai"

#. module: l10n_es_ticketbai_oss
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_account_invoice_tax__tbai_vat_exemption_key
msgid "TicketBAI - VAT Exemption Key"
msgstr "TicketBAI - Causa exención impuesto"

#. module: l10n_es_ticketbai_oss
#: model:ir.model,name:l10n_es_ticketbai_oss.model_tbai_invoice_tax
msgid "TicketBAI Invoice taxes"
msgstr "TicketBAI Factura impuestos"

78 changes: 78 additions & 0 deletions l10n_es_ticketbai_oss/i18n/eu_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_ticketbai_oss
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-11 08:41+0000\n"
"PO-Revision-Date: 2024-03-11 08:41+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_ticketbai_oss
#: selection:tbai.invoice.tax,not_subject_to_cause:0
msgid "IE"
msgstr ""

#. module: l10n_es_ticketbai_oss
#: selection:account.tax,not_subject_to_cause:0
msgid "IE - No sujeto en el TAI por reglas de localización, pero repercute impuesto extranjero, IPS/IGIC o IVA de otro estado miembro UE."
msgstr "IE - Lokalizazio-arauak direla-eta ZALen subjektua ez dena, baina atzerriko zerga, IPS/IGIC edo EBko beste estatu kide bateko BEZa eragiten duena."

#. module: l10n_es_ticketbai_oss
#: model:ir.model,name:l10n_es_ticketbai_oss.model_account_invoice_tax
msgid "Invoice Tax"
msgstr "Faktura zerga"

#. module: l10n_es_ticketbai_oss
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_account_tax__not_subject_to_cause
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_tbai_invoice_tax__not_subject_to_cause
msgid "Not Subject to Cause"
msgstr "Ez da kausaren menpe"

#. module: l10n_es_ticketbai_oss
#: selection:tbai.invoice.tax,not_subject_to_cause:0
msgid "OT"
msgstr ""

#. module: l10n_es_ticketbai_oss
#: selection:account.tax,not_subject_to_cause:0
msgid "OT - No sujeto por el artículo 7 de la Norma Foral de IVA Otros supuestos de no sujeción. "
msgstr "OT - BEZaren Foru Arauaren 7. artikuluak lotu gabea Lotu gabeko beste kasu batzuk."

#. module: l10n_es_ticketbai_oss
#: selection:tbai.invoice.tax,not_subject_to_cause:0
msgid "RL"
msgstr ""

#. module: l10n_es_ticketbai_oss
#: selection:account.tax,not_subject_to_cause:0
msgid "RL - No sujeto por reglas de localización."
msgstr "RL - Lokalizazio arauengatik lotu gabe."

#. module: l10n_es_ticketbai_oss
#: model:ir.model,name:l10n_es_ticketbai_oss.model_account_tax
msgid "Tax"
msgstr "Zerga"

#. module: l10n_es_ticketbai_oss
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_account_tax__tbai_tax_map_id
msgid "Tbai Tax Map"
msgstr "TicketBai zerga-mota"

#. module: l10n_es_ticketbai_oss
#: model:ir.model.fields,field_description:l10n_es_ticketbai_oss.field_account_invoice_tax__tbai_vat_exemption_key
msgid "TicketBAI - VAT Exemption Key"
msgstr "TicketBAI - Zerga Salbuespenaren Giltza"

#. module: l10n_es_ticketbai_oss
#: model:ir.model,name:l10n_es_ticketbai_oss.model_tbai_invoice_tax
msgid "TicketBAI Invoice taxes"
msgstr "TicketBAI Fakturaren zergak"

3 changes: 3 additions & 0 deletions l10n_es_ticketbai_oss/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import account_tax
from . import account_invoice_tax
from . import ticketbai_invoice_tax
31 changes: 31 additions & 0 deletions l10n_es_ticketbai_oss/models/account_invoice_tax.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2024 Binovo IT Human Project SL
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class AccountInvoiceTax(models.Model):
_inherit = "account.invoice.tax"

def tbai_es_prestacion_servicios(self):
if self.tax_id.tbai_tax_map_id:
return (
True
if self.tax_id.tbai_tax_map_id.code in ("SNS", "SIE", "S", "SER")
else False
)
return super().tbai_es_prestacion_servicios()

def tbai_es_entrega(self):
if self.tax_id.tbai_tax_map_id:
return (
True
if self.tax_id.tbai_tax_map_id.code in ("B", "BNS", "IEE", "SER")
else False
)
return super().tbai_es_entrega()

def tbai_get_value_causa(self):
if self.tax_id.not_subject_to_cause:
return self.tax_id.not_subject_to_cause
return super().tbai_get_value_causa()
27 changes: 27 additions & 0 deletions l10n_es_ticketbai_oss/models/account_tax.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2024 Binovo IT Human Project SL
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountTax(models.Model):
_inherit = "account.tax"

tbai_tax_map_id = fields.Many2one(
comodel_name="tbai.tax.map", string="Tbai Tax Map"
)
not_subject_to_cause = fields.Selection(
selection=[
("OT", "OT - No sujeto por el artículo 7 de la Norma Foral de IVA Otros"
" supuestos de no sujeción. "),
("RL", "RL - No sujeto por reglas de localización."),
("IE", "IE - No sujeto en el TAI por reglas de localización, pero repercute"
" impuesto extranjero, IPS/IGIC o IVA de otro estado miembro UE."),
],
string="Not Subject to Cause",
)

def tbai_is_subject_to_tax(self):
if self.tbai_tax_map_id and self.tbai_tax_map_id.code in ("SNS", "BNS"):
return False
return super().tbai_is_subject_to_tax()
10 changes: 10 additions & 0 deletions l10n_es_ticketbai_oss/models/ticketbai_invoice_tax.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2024 Binovo IT Human Project SL
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class TicketBaiTax(models.Model):
_inherit = "tbai.invoice.tax"

not_subject_to_cause = fields.Selection(selection_add=[("IE", "IE")])
Binary file added l10n_es_ticketbai_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.
1 change: 1 addition & 0 deletions l10n_es_ticketbai_oss/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_invoice_oss
Loading

0 comments on commit 3905c2a

Please sign in to comment.