-
-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG]l10n_es_aeat_sii_oca: Migration to 17.0
- Loading branch information
1 parent
6467a7f
commit 8f6de46
Showing
38 changed files
with
840 additions
and
678 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2025 Sygel - Manuel Regidor | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
from odoo import fields, models | ||
|
||
|
||
class IrCronTrigger(models.Model): | ||
_inherit = "ir.cron.trigger" | ||
|
||
def _get_aeat_time_field(self): | ||
self.ensure_one() | ||
return False | ||
|
||
def _get_aeat_account_moves(self): | ||
self.ensure_one() | ||
return self.env["account.move"] | ||
|
||
def _get_aeat_sending_time(self, account_move): | ||
return False | ||
|
||
def aeat_do_now(self): | ||
for trigger in self: | ||
time_field = trigger._get_aeat_time_field() | ||
account_moves = trigger._get_aeat_account_moves() | ||
if time_field and account_moves: | ||
account_moves.write({time_field: fields.Datetime.now()}) | ||
trigger.sudo().write({"call_at": fields.Datetime.now()}) | ||
|
||
def aeat_cancel_now(self): | ||
for trigger in self: | ||
time_field = trigger._get_aeat_time_field() | ||
account_moves = trigger._get_aeat_account_moves() | ||
if time_field and account_moves: | ||
account_moves.write({time_field: False}) | ||
trigger.sudo().unlink() | ||
|
||
def aeat_reschedule_sudo(self): | ||
for trigger in self: | ||
time_field = trigger._get_aeat_time_field() | ||
account_moves = trigger._get_aeat_account_moves() | ||
if time_field and account_moves: | ||
for account_move in account_moves: | ||
sending_time = trigger._get_aeat_sending_time(account_move) | ||
account_move.write({time_field: sending_time}) | ||
trigger.write({"call_at": sending_time}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ Suministro Inmediato de Información en el IVA | |
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:10113ecb0d04bfe1b6ece65a39892141bff2e511f72909f4cac9e9bb7d86d0ed | ||
!! source digest: sha256:dd4688bc2a1c4bd195d8dd4949f98b380e1ba0858c791d7685e37e7a4a60f9d0 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png | ||
|
@@ -46,10 +46,6 @@ Para instalar esté módulo necesita: | |
2. Libreria Python Requests, se puede instalar con el comando 'pip | ||
install requests' | ||
|
||
y el módulo queue_job que se encuentra en: | ||
|
||
https://github.com/OCA/queue | ||
|
||
Configuration | ||
============= | ||
|
||
|
@@ -63,35 +59,22 @@ Para configurar este módulo es necesario: | |
formato p12, este certificado no se puede usar directamente con Zeep. | ||
Se tiene que extraer la clave pública y la clave privada. | ||
|
||
En Linux se pueden usar los siguientes comandos: | ||
|
||
- Clave pública: "openssl pkcs12 -in Certificado.p12 -nokeys -out | ||
publicCert.crt -nodes" | ||
- Clave privada: "openssl pkcs12 -in Certifcado.p12 -nocerts -out | ||
privateKey.pem -nodes" | ||
|
||
Además, el módulo queue_job necesita estar configurado de una de estas | ||
formas: | ||
|
||
1. Ajustando variables de entorno: | ||
Existen dos parámetros del sistema creados con la instalación del módulo | ||
cuyos valores pueden configurarse: | ||
|
||
ODOO_QUEUE_JOB_CHANNELS=root:4 | ||
1. l10n_es_aeat_sii_oca.sii_batch: Almacena el número de facturas máximo | ||
que se enviarán al SII cada vez que se realice un envío. El valor por | ||
defecto es 50. | ||
2. l10n_es_aeat_sii_oca.sii_retry: Almacena el número de veces que se | ||
intentará enviar una factura al SII en caso de error en el envío. El | ||
valor por defecto es 5. | ||
|
||
u otro canal de configuración. Por defecto es root:1 | ||
|
||
Si xmlrpc_port no está definido: ODOO_QUEUE_JOB_PORT=8069 | ||
|
||
2. Otra alternativa es usuando un fichero de configuración: | ||
|
||
[options] (...) workers = 4 server_wide_modules = | ||
web,base_sparse_field,queue_job | ||
|
||
(...) [queue_job] channels = root:4 | ||
|
||
3. Por último, arrancando Odoo con | ||
--load=web,base_sparse_field,queue_job y --workers más grande que 1. | ||
En Linux se pueden usar los siguientes comandos: | ||
|
||
Más información http://odoo-connector.com | ||
- Clave pública: "openssl pkcs12 -in Certificado.p12 -nokeys -out | ||
publicCert.crt -nodes" | ||
- Clave privada: "openssl pkcs12 -in Certifcado.p12 -nocerts -out | ||
privateKey.pem -nodes" | ||
|
||
Usage | ||
===== | ||
|
@@ -102,17 +85,21 @@ servidor de AEAT. | |
Known issues / Roadmap | ||
====================== | ||
|
||
- Comunicación de cobros y pagos. | ||
- Determinadas facturas intracomunitarias (Articulo 66 RIVA). | ||
- Asistente para consultar los documentos comunicados. | ||
- Libro de bienes de inversión (Libro anual se crea un módulo aparte). | ||
- Regímenes especiales de seguros, de agencias de viaje o de bienes | ||
usados. | ||
- Devolución de IVA de viajeros. | ||
- Facturas rectificativas por sustitución. | ||
- Soportar facturas de canje de facturas simplificadas por facturas | ||
completas. Ver https://github.com/OCA/l10n-spain/issues/1171 para más | ||
información. | ||
- Comunicación de cobros y pagos. | ||
- Determinadas facturas intracomunitarias (Articulo 66 RIVA). | ||
- Asistente para consultar los documentos comunicados. | ||
- Libro de bienes de inversión (Libro anual se crea un módulo aparte). | ||
- Regímenes especiales de seguros, de agencias de viaje o de bienes | ||
usados. | ||
- Devolución de IVA de viajeros. | ||
- Facturas rectificativas por sustitución. | ||
- Soportar facturas de canje de facturas simplificadas por facturas | ||
completas. Ver https://github.com/OCA/l10n-spain/issues/1171 para más | ||
información. | ||
- El campo aeat_state, definido en aeat.mixin, puede establecer el | ||
estado de envío no solamente al SII, sino también, por ejemplo, a | ||
VERIFACTU, lo que podría ocasionar problemas en caso de que tener que | ||
enviar una factura a ambas. | ||
|
||
Bug Tracker | ||
=========== | ||
|
@@ -139,38 +126,40 @@ Authors | |
* Otherway | ||
* Tecnativa | ||
* Javi Melendez | ||
* Sygel | ||
|
||
Contributors | ||
------------ | ||
|
||
- Ignacio Ibeas <[email protected]> | ||
- Rubén Cerdà <[email protected]> | ||
- Ramon Guiu <[email protected]> | ||
- Pablo Fuentes <[email protected]> | ||
- Jordi Tolsà <[email protected]> | ||
- Ismael Calvo <[email protected]> | ||
- Omar Castiñeira - Comunitea S.L. <[email protected]> | ||
- Juanjo Algaz <[email protected]>, Planeta Huerto | ||
<[email protected]> | ||
- Javi Melendez <[email protected]> | ||
- Santi Argüeso - Comunitea S.L. <[email protected]> | ||
- Angel Moya - PESOL <[email protected]> | ||
- Eric Antonés - NuoBiT Solutions, S.L. <[email protected]> | ||
- `Sygel <https://www.sygel.es>`__: | ||
|
||
- Valentin Vinagre | ||
|
||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- Pedro M. Baeza | ||
- João Marques | ||
|
||
- Lois Rilo Antelo <[email protected]> | ||
- Eduardo de Miguel ([email protected]) | ||
- Jose Zambudio <[email protected]> | ||
- `Factor Libre <https://factorlibre.com>`__: | ||
|
||
- Luis J. Salvatierra <[email protected]> | ||
- Ignacio Ibeas <[email protected]> | ||
- Rubén Cerdà <[email protected]> | ||
- Ramon Guiu <[email protected]> | ||
- Pablo Fuentes <[email protected]> | ||
- Jordi Tolsà <[email protected]> | ||
- Ismael Calvo <[email protected]> | ||
- Omar Castiñeira - Comunitea S.L. <[email protected]> | ||
- Juanjo Algaz <[email protected]>, Planeta Huerto | ||
<[email protected]> | ||
- Javi Melendez <[email protected]> | ||
- Santi Argüeso - Comunitea S.L. <[email protected]> | ||
- Angel Moya - PESOL <[email protected]> | ||
- Eric Antonés - NuoBiT Solutions, S.L. <[email protected]> | ||
- `Sygel <https://www.sygel.es>`__: | ||
|
||
- Valentin Vinagre | ||
- Manuel Regidor | ||
|
||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- Pedro M. Baeza | ||
- João Marques | ||
|
||
- Lois Rilo Antelo <[email protected]> | ||
- Eduardo de Miguel ([email protected]) | ||
- Jose Zambudio <[email protected]> | ||
- `Factor Libre <https://factorlibre.com>`__: | ||
|
||
- Luis J. Salvatierra <[email protected]> | ||
|
||
Maintainers | ||
----------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,12 @@ | |
# Copyright 2023 Aures Tic - Jose Zambudio <[email protected]> | ||
# Copyright 2023 Pol Reig <[email protected]> | ||
# Copyright 2017-2024 Tecnativa - Pedro M. Baeza | ||
# Copyright 2024 Manuel Regidor <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Suministro Inmediato de Información en el IVA", | ||
"version": "16.0.2.0.0", | ||
"version": "17.0.1.0.0", | ||
"category": "Accounting & Finance", | ||
"website": "https://github.com/OCA/l10n-spain", | ||
"author": "Acysos S.L.," | ||
|
@@ -30,6 +31,7 @@ | |
"Otherway," | ||
"Tecnativa," | ||
"Javi Melendez," | ||
"Sygel," | ||
"Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"application": False, | ||
|
@@ -39,12 +41,11 @@ | |
"external_dependencies": {"python": ["zeep", "requests"]}, | ||
"depends": [ | ||
"account_invoice_refund_link", | ||
"l10n_es", | ||
"l10n_es_aeat", | ||
"queue_job", | ||
], | ||
"data": [ | ||
"data/aeat_sii_queue_job.xml", | ||
"data/ir_config_parameter_data.xml", | ||
"data/ir_cron.xml", | ||
"data/aeat_sii_tax_agency_data.xml", | ||
"views/res_company_view.xml", | ||
"views/account_move_views.xml", | ||
|
@@ -53,11 +54,12 @@ | |
"views/aeat_sii_mapping_registration_keys_view.xml", | ||
"data/aeat_sii_mapping_registration_keys_data.xml", | ||
"views/aeat_sii_map_view.xml", | ||
"data/l10n.es.aeat.map.tax.line.tax.csv", | ||
"data/aeat_sii_map_data.xml", | ||
"security/ir.model.access.csv", | ||
"security/aeat_sii.xml", | ||
"views/product_view.xml", | ||
"views/queue_job_views.xml", | ||
"views/ir_cron_trigger_views.xml", | ||
"views/account_fiscal_position_view.xml", | ||
"views/res_partner_views.xml", | ||
"views/aeat_tax_agency_view.xml", | ||
|
Oops, something went wrong.