Skip to content

Commit 209be65

Browse files
committed
Merge PR #4500 into 16.0
Signed-off-by pedrobaeza
2 parents 94126c1 + 8ffc23c commit 209be65

File tree

17 files changed

+684
-3
lines changed

17 files changed

+684
-3
lines changed

l10n_es_verifactu_oca/models/account_move.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,10 @@ def _check_inconsistent_taxes(self):
504504
def _check_all_taxes_mapped(self):
505505
if not (tax_lines := self._get_aeat_tax_info()):
506506
return False
507-
verifactu_map = self._get_verifactu_map(self._get_document_date())
508-
tax_templates = verifactu_map.map_lines.taxes
509-
mapped_taxes = self.company_id.get_taxes_from_templates(tax_templates)
507+
date = self._get_document_date()
508+
verifactu_map = self._get_verifactu_map(date)
509+
codes = verifactu_map.map_lines.mapped("code")
510+
mapped_taxes = self._get_verifactu_taxes_map(codes, date)
510511
for tax_line in tax_lines.values():
511512
if tax_line["tax"] not in mapped_taxes:
512513
return False
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
============================
6+
Comunicación VERI*FACTU: OSS
7+
============================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:477df62c85532cb7e4680721d9d3d0fa6522e08bddfa280dc224dfd5f316bb88
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github
24+
:target: https://github.com/OCA/l10n-spain/tree/16.0/l10n_es_verifactu_oca_oss
25+
:alt: OCA/l10n-spain
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/l10n-spain-16-0/l10n-spain-16-0-l10n_es_verifactu_oca_oss
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=16.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
Este módulo compatibiliza el envío a VERI*FACTU de las facturas de comercio B2C a los países intracomunitarios según el marco de la normativa europea One-Stop Shop (OSS).
36+
37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
42+
Installation
43+
============
44+
45+
Para instalar esté módulo necesita los módulos `account_fiscal_position_partner_type` y `l10n_eu_oss`, que se encuentran en https://github.com/OCA/account-fiscal-rule.git
46+
47+
Configuration
48+
=============
49+
50+
Para configurar este módulo es necesario:
51+
52+
#. En la posiciones fiscales generadas por el modulo l10n_eu_oss debemos activarlas para el envío a Verifactu.
53+
Ademas debemos definir en la pestaña de VERI*FACTU la "Clave de registro" 17.
54+
55+
Bug Tracker
56+
===========
57+
58+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-spain/issues>`_.
59+
In case of trouble, please check there if your issue has already been reported.
60+
If you spotted it first, help us to smash it by providing a detailed and welcomed
61+
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_verifactu_oca_oss%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
62+
63+
Do not contact contributors directly about support or help with technical issues.
64+
65+
Credits
66+
=======
67+
68+
Authors
69+
~~~~~~~
70+
71+
* Factor Libre
72+
73+
Contributors
74+
~~~~~~~~~~~~
75+
76+
* Almudena de La Puente <[email protected]>
77+
78+
Maintainers
79+
~~~~~~~~~~~
80+
81+
This module is maintained by the OCA.
82+
83+
.. image:: https://odoo-community.org/logo.png
84+
:alt: Odoo Community Association
85+
:target: https://odoo-community.org
86+
87+
OCA, or the Odoo Community Association, is a nonprofit organization whose
88+
mission is to support the collaborative development of Odoo features and
89+
promote its widespread use.
90+
91+
This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/16.0/l10n_es_verifactu_oca_oss>`_ project on GitHub.
92+
93+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2025 FactorLibre - Almudena de La Puente <[email protected]>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from . import models
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 FactorLibre - Almudena de La Puente <[email protected]>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Comunicación VERI*FACTU: OSS",
6+
"version": "16.0.1.0.0",
7+
"category": "Accounting & Finance",
8+
"website": "https://github.com/OCA/l10n-spain",
9+
"author": "Factor Libre, Odoo Community Association (OCA)",
10+
"license": "AGPL-3",
11+
"application": False,
12+
"installable": True,
13+
"autoinstall": True,
14+
"depends": [
15+
"l10n_es_verifactu_oca",
16+
"l10n_eu_oss_oca",
17+
],
18+
"data": [],
19+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * l10n_es_verifactu_oca_oss
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2025-10-22 16:51+0000\n"
10+
"Last-Translator: \n"
11+
"Language-Team: none\n"
12+
"Language: es\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2025 FactorLibre - Almudena de La Puente <[email protected]>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from . import verifactu_mixin
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2025 Factor Libre - Almudena de La Puente <[email protected]>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
from odoo import api, models
5+
6+
7+
class VerifactuMixin(models.AbstractModel):
8+
_inherit = "verifactu.mixin"
9+
10+
@api.model
11+
def _get_verifactu_taxes_map(self, codes, date):
12+
"""Inject OSS taxes when querying not subjected invoices."""
13+
taxes = super()._get_verifactu_taxes_map(codes, date)
14+
if any([map_code == "N2" for map_code in codes]):
15+
taxes |= self.env["account.tax"].search(
16+
[
17+
("oss_country_id", "!=", False),
18+
("company_id", "=", self.company_id.id),
19+
]
20+
)
21+
return taxes
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Para configurar este módulo es necesario:
2+
3+
#. En la posiciones fiscales generadas por el modulo l10n_eu_oss debemos activarlas para el envío a Verifactu.
4+
Ademas debemos definir en la pestaña de VERI*FACTU la "Clave de registro" 17.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Almudena de La Puente <[email protected]>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Este módulo compatibiliza el envío a VERI*FACTU de las facturas de comercio B2C a los países intracomunitarios según el marco de la normativa europea One-Stop Shop (OSS).

0 commit comments

Comments
 (0)