odoo-addon-l10n-es-verifactu-oca 16.0.1.0.6__py3-none-any.whl → 17.0.1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of odoo-addon-l10n-es-verifactu-oca might be problematic. Click here for more details.
- odoo/addons/l10n_es_verifactu_oca/README.rst +99 -60
- odoo/addons/l10n_es_verifactu_oca/__manifest__.py +4 -3
- odoo/addons/l10n_es_verifactu_oca/data/l10n.es.aeat.map.tax.line.tax.csv +50 -0
- odoo/addons/l10n_es_verifactu_oca/data/template/account.fiscal.position-es_common.csv +27 -0
- odoo/addons/l10n_es_verifactu_oca/data/verifactu.map.csv +2 -0
- odoo/addons/l10n_es_verifactu_oca/data/verifactu.map.line.csv +8 -0
- odoo/addons/l10n_es_verifactu_oca/hooks.py +5 -5
- odoo/addons/l10n_es_verifactu_oca/i18n/es.po +2 -2
- odoo/addons/l10n_es_verifactu_oca/i18n/l10n_es_verifactu_oca.pot +8 -30
- odoo/addons/l10n_es_verifactu_oca/models/__init__.py +1 -1
- odoo/addons/l10n_es_verifactu_oca/models/account_chart_template.py +15 -0
- odoo/addons/l10n_es_verifactu_oca/models/account_move.py +10 -6
- odoo/addons/l10n_es_verifactu_oca/models/verifactu_invoice_entry.py +4 -2
- odoo/addons/l10n_es_verifactu_oca/models/verifactu_map.py +3 -1
- odoo/addons/l10n_es_verifactu_oca/models/verifactu_mixin.py +8 -4
- odoo/addons/l10n_es_verifactu_oca/models/verifactu_registration_key.py +4 -2
- odoo/addons/l10n_es_verifactu_oca/readme/CONFIGURE.md +27 -0
- odoo/addons/l10n_es_verifactu_oca/readme/CONTRIBUTORS.md +16 -0
- odoo/addons/l10n_es_verifactu_oca/readme/INSTALL.md +6 -0
- odoo/addons/l10n_es_verifactu_oca/readme/ROADMAP.md +30 -0
- odoo/addons/l10n_es_verifactu_oca/readme/USAGE.md +3 -0
- odoo/addons/l10n_es_verifactu_oca/static/description/index.html +88 -47
- odoo/addons/l10n_es_verifactu_oca/tests/common.py +9 -8
- odoo/addons/l10n_es_verifactu_oca/tests/test_10n_es_verifactu.py +9 -11
- odoo/addons/l10n_es_verifactu_oca/views/account_fiscal_position_view.xml +1 -1
- odoo/addons/l10n_es_verifactu_oca/views/account_journal_view.xml +2 -4
- odoo/addons/l10n_es_verifactu_oca/views/account_move_view.xml +14 -10
- odoo/addons/l10n_es_verifactu_oca/views/report_invoice.xml +2 -5
- odoo/addons/l10n_es_verifactu_oca/views/res_company_view.xml +5 -5
- odoo/addons/l10n_es_verifactu_oca/views/verifactu_map_lines_view.xml +4 -7
- odoo_addon_l10n_es_verifactu_oca-17.0.1.0.1.dist-info/METADATA +208 -0
- {odoo_addon_l10n_es_verifactu_oca-16.0.1.0.6.dist-info → odoo_addon_l10n_es_verifactu_oca-17.0.1.0.1.dist-info}/RECORD +35 -35
- {odoo_addon_l10n_es_verifactu_oca-16.0.1.0.6.dist-info → odoo_addon_l10n_es_verifactu_oca-17.0.1.0.1.dist-info}/WHEEL +1 -1
- odoo_addon_l10n_es_verifactu_oca-17.0.1.0.1.dist-info/top_level.txt +1 -0
- odoo/addons/l10n_es_verifactu_oca/data/account_fiscal_position_template_data.xml +0 -149
- odoo/addons/l10n_es_verifactu_oca/data/verifactu_map_data.xml +0 -128
- odoo/addons/l10n_es_verifactu_oca/i18n/ca.po +0 -1632
- odoo/addons/l10n_es_verifactu_oca/i18n/ca_ES.po +0 -1600
- odoo/addons/l10n_es_verifactu_oca/models/account_fiscal_position_template.py +0 -18
- odoo/addons/l10n_es_verifactu_oca/readme/CONFIGURE.rst +0 -18
- odoo/addons/l10n_es_verifactu_oca/readme/CONTRIBUTORS.rst +0 -16
- odoo/addons/l10n_es_verifactu_oca/readme/INSTALL.rst +0 -4
- odoo/addons/l10n_es_verifactu_oca/readme/ROADMAP.rst +0 -15
- odoo/addons/l10n_es_verifactu_oca/readme/USAGE.rst +0 -1
- odoo_addon_l10n_es_verifactu_oca-16.0.1.0.6.dist-info/METADATA +0 -168
- odoo_addon_l10n_es_verifactu_oca-16.0.1.0.6.dist-info/top_level.txt +0 -1
- /odoo/addons/l10n_es_verifactu_oca/readme/{DESCRIPTION.rst → DESCRIPTION.md} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Para configurar este módulo es necesario:
|
|
2
|
+
|
|
3
|
+
1. Acceder a Facturación/Contabilidad -\> Configuración -\> AEAT -\>
|
|
4
|
+
Agencia Tributaria, podrás consultar las URLs del servicio SOAP de
|
|
5
|
+
Hacienda. Estas URLs pueden cambiar según comunidades
|
|
6
|
+
2. El certificado enviado por la FMNT es en formato p12, este
|
|
7
|
+
certificado no se puede usar directamente con Zeep. Accede a
|
|
8
|
+
Facturación/Contabilidad -\> Configuración -\> AEAT -\> Certificados
|
|
9
|
+
AEAT, y allí podrás: Subir el certificado p12 y extraer las claves
|
|
10
|
+
públicas y privadas con el botón "Obtener claves"
|
|
11
|
+
3. Debes tener en cuenta que los certificados se alojan en una carpeta
|
|
12
|
+
accesible por la instalación de Odoo.
|
|
13
|
+
4. Completar los datos de desarrollador y del encadenamiento a nivel de
|
|
14
|
+
compañía en la pestaña de VERI\*FACTU.
|
|
15
|
+
|
|
16
|
+
En caso de que la obtención de claves no funcione y uses Linux, cuentas
|
|
17
|
+
con los siguientes comandos para tratar de solucionarlo:
|
|
18
|
+
|
|
19
|
+
- Clave pública: "openssl pkcs12 -in Certificado.p12 -nokeys -out
|
|
20
|
+
publicCert.crt -nodes"
|
|
21
|
+
- Clave privada: "openssl pkcs12 -in Certificado.p12 -nocerts -out
|
|
22
|
+
privateKey.pem -nodes"
|
|
23
|
+
|
|
24
|
+
1. Establecer en las posiciones fiscales la clave de impuestos y la
|
|
25
|
+
clave de registro VERI\*FACTU.
|
|
26
|
+
2. Para aplicar las claves ejecute el asistente de actualización del
|
|
27
|
+
módulo accountchart_update.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
- Aures TIC:
|
|
2
|
+
- Jose Zambudio
|
|
3
|
+
- Almudena de La Puente
|
|
4
|
+
- Anna Martínez
|
|
5
|
+
- ForgeFlow S.L.:
|
|
6
|
+
- Laura Cazorla
|
|
7
|
+
- Andreu Orensanz
|
|
8
|
+
- Jordi Ballester
|
|
9
|
+
- Ozono multimedia:
|
|
10
|
+
- Iván Antón
|
|
11
|
+
- SDi:
|
|
12
|
+
- Fernando La Chica
|
|
13
|
+
- Process control:
|
|
14
|
+
- Jorge Luis López
|
|
15
|
+
- Tecnativa:
|
|
16
|
+
- Pedro M. Baeza
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
> - Refactorización SII-VERI\*FACTU en l10nes_aeat de los métodos que
|
|
2
|
+
> sean comunes.
|
|
3
|
+
> - Envío separado de la confirmación de la factura
|
|
4
|
+
> (cron.trigger/queque.job)
|
|
5
|
+
> - Control de errores del sistema, generar avisos. (caída de aeat,
|
|
6
|
+
> errores de conexión, etc.)
|
|
7
|
+
> - Declaración responsable.
|
|
8
|
+
> <https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/certificacion-sistemas-informaticos-declaracion-responsable.html?faqId=a15d77fe52572910VgnVCM100000dc381e0aRCRD>
|
|
9
|
+
> - Posibilidad de consultar el estado de las facturas enviadas.
|
|
10
|
+
> - Operaciones exentas y causas de exención.
|
|
11
|
+
> - Crear un selection con todos los valores posibles de codigos de
|
|
12
|
+
> error, para poder guardarlo y agrupar las facturas por ese código.
|
|
13
|
+
> - Contemplar el tiempo de espera entre envíos de registros cuando AEAT
|
|
14
|
+
> devuelve un tiempo superior a 60 segundos.
|
|
15
|
+
|
|
16
|
+
CASOS NO CUBIERTOS: 1 - Modificación de facturas enviadas (AEAT
|
|
17
|
+
recomienda generar rectificativa). Según AEAT: Si los errores detectados
|
|
18
|
+
tras la emisión NO están contemplados en el ROF, pero afectan a campos
|
|
19
|
+
del registro de facturación (RF) generado al emitir la factura (que,
|
|
20
|
+
digamos, “no se ven” en la factura impresa, es decir, son campos
|
|
21
|
+
“internos”, como ciertas codificaciones tributarias), se debe corregir
|
|
22
|
+
la factura original (esos datos “internos” de la misma) y se debe
|
|
23
|
+
generar un RF de alta de subsanación de esa factura donde conste ya la
|
|
24
|
+
nueva información que proceda. Estos casos deberían ser MUY POCO
|
|
25
|
+
FRECUENTES. 2 - Anulación de facturas enviadas (AEAT recomienda generar
|
|
26
|
+
rectificativa). Según AEAT: "Si se considera que "toda la factura" en sí
|
|
27
|
+
misma está mal o no debería haberse emitido, siempre que para
|
|
28
|
+
solucionarlo no deba emplearse algún procedimiento (de rectificativa u
|
|
29
|
+
otro) previsto en el ROF, se podrá "anular" generando para ello un RF de
|
|
30
|
+
anulación. Estos casos deberían ser MUY POCO FRECUENTES."
|
|
@@ -372,9 +372,9 @@ ul.auto-toc {
|
|
|
372
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
373
373
|
!! changes will be overwritten. !!
|
|
374
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:c2e9aea5056ccc5810ccc0dc40cc3df9b3c666a307d7ccc72413131769ad749f
|
|
376
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
|
-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-spain/tree/
|
|
377
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-spain/tree/17.0/l10n_es_verifactu_oca"><img alt="OCA/l10n-spain" src="https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_verifactu_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
378
|
<p>Módulo para la presentación inmediata de la facturación.</p>
|
|
379
379
|
<p><strong>Table of contents</strong></p>
|
|
380
380
|
<div class="contents local topic" id="contents">
|
|
@@ -396,63 +396,92 @@ ul.auto-toc {
|
|
|
396
396
|
<h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
|
|
397
397
|
<p>Para instalar esté módulo necesita:</p>
|
|
398
398
|
<ol class="arabic simple">
|
|
399
|
-
<li>Libreria Python Zeep, se puede instalar con el comando ‘pip install
|
|
400
|
-
|
|
399
|
+
<li>Libreria Python Zeep, se puede instalar con el comando ‘pip install
|
|
400
|
+
zeep’</li>
|
|
401
|
+
<li>Libreria Python Requests, se puede instalar con el comando ‘pip
|
|
402
|
+
install requests’</li>
|
|
401
403
|
</ol>
|
|
402
404
|
</div>
|
|
403
405
|
<div class="section" id="configuration">
|
|
404
406
|
<h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
|
|
405
407
|
<p>Para configurar este módulo es necesario:</p>
|
|
406
408
|
<ol class="arabic simple">
|
|
407
|
-
<li>Acceder a Facturación/Contabilidad -> Configuración -> AEAT ->
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
409
|
+
<li>Acceder a Facturación/Contabilidad -> Configuración -> AEAT ->
|
|
410
|
+
Agencia Tributaria, podrás consultar las URLs del servicio SOAP de
|
|
411
|
+
Hacienda. Estas URLs pueden cambiar según comunidades</li>
|
|
412
|
+
<li>El certificado enviado por la FMNT es en formato p12, este
|
|
413
|
+
certificado no se puede usar directamente con Zeep. Accede a
|
|
414
|
+
Facturación/Contabilidad -> Configuración -> AEAT -> Certificados
|
|
415
|
+
AEAT, y allí podrás: Subir el certificado p12 y extraer las claves
|
|
416
|
+
públicas y privadas con el botón “Obtener claves”</li>
|
|
417
|
+
<li>Debes tener en cuenta que los certificados se alojan en una carpeta
|
|
418
|
+
accesible por la instalación de Odoo.</li>
|
|
419
|
+
<li>Completar los datos de desarrollador y del encadenamiento a nivel de
|
|
420
|
+
compañía en la pestaña de VERI*FACTU.</li>
|
|
414
421
|
</ol>
|
|
415
|
-
<p>En caso de que la obtención de claves no funcione y uses Linux, cuentas
|
|
422
|
+
<p>En caso de que la obtención de claves no funcione y uses Linux, cuentas
|
|
423
|
+
con los siguientes comandos para tratar de solucionarlo:</p>
|
|
416
424
|
<ul class="simple">
|
|
417
|
-
<li>Clave pública: “openssl pkcs12 -in Certificado.p12 -nokeys -out
|
|
418
|
-
|
|
425
|
+
<li>Clave pública: “openssl pkcs12 -in Certificado.p12 -nokeys -out
|
|
426
|
+
publicCert.crt -nodes”</li>
|
|
427
|
+
<li>Clave privada: “openssl pkcs12 -in Certificado.p12 -nocerts -out
|
|
428
|
+
privateKey.pem -nodes”</li>
|
|
419
429
|
</ul>
|
|
420
430
|
<ol class="arabic simple">
|
|
421
|
-
<li>Establecer en las posiciones fiscales la clave de impuestos y la
|
|
422
|
-
|
|
431
|
+
<li>Establecer en las posiciones fiscales la clave de impuestos y la
|
|
432
|
+
clave de registro VERI*FACTU.</li>
|
|
433
|
+
<li>Para aplicar las claves ejecute el asistente de actualización del
|
|
434
|
+
módulo accountchart_update.</li>
|
|
423
435
|
</ol>
|
|
424
436
|
</div>
|
|
425
437
|
<div class="section" id="usage">
|
|
426
438
|
<h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
|
|
427
|
-
<p>Cuando se valida una factura, automáticamente genera el registro de
|
|
439
|
+
<p>Cuando se valida una factura, automáticamente genera el registro de
|
|
440
|
+
envío para verifactu. Cada minuto se enviarán todos aquellos registros
|
|
441
|
+
pendientes de enviar mediante un cron.</p>
|
|
428
442
|
</div>
|
|
429
443
|
<div class="section" id="known-issues-roadmap">
|
|
430
444
|
<h2><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h2>
|
|
431
445
|
<blockquote>
|
|
432
446
|
<ul class="simple">
|
|
433
|
-
<li>Refactorización SII-VERI*FACTU en
|
|
434
|
-
|
|
435
|
-
<li>
|
|
436
|
-
|
|
447
|
+
<li>Refactorización SII-VERI*FACTU en l10nes_aeat de los métodos que
|
|
448
|
+
sean comunes.</li>
|
|
449
|
+
<li>Envío separado de la confirmación de la factura
|
|
450
|
+
(cron.trigger/queque.job)</li>
|
|
451
|
+
<li>Control de errores del sistema, generar avisos. (caída de aeat,
|
|
452
|
+
errores de conexión, etc.)</li>
|
|
453
|
+
<li>Declaración responsable.
|
|
454
|
+
<a class="reference external" href="https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/certificacion-sistemas-informaticos-declaracion-responsable.html?faqId=a15d77fe52572910VgnVCM100000dc381e0aRCRD">https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/certificacion-sistemas-informaticos-declaracion-responsable.html?faqId=a15d77fe52572910VgnVCM100000dc381e0aRCRD</a></li>
|
|
437
455
|
<li>Posibilidad de consultar el estado de las facturas enviadas.</li>
|
|
438
456
|
<li>Operaciones exentas y causas de exención.</li>
|
|
439
|
-
<li>Crear un selection con todos los valores posibles de codigos de
|
|
440
|
-
|
|
457
|
+
<li>Crear un selection con todos los valores posibles de codigos de
|
|
458
|
+
error, para poder guardarlo y agrupar las facturas por ese código.</li>
|
|
459
|
+
<li>Contemplar el tiempo de espera entre envíos de registros cuando
|
|
460
|
+
AEAT devuelve un tiempo superior a 60 segundos.</li>
|
|
441
461
|
</ul>
|
|
442
462
|
</blockquote>
|
|
443
|
-
<p>CASOS NO CUBIERTOS:
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
463
|
+
<p>CASOS NO CUBIERTOS: 1 - Modificación de facturas enviadas (AEAT
|
|
464
|
+
recomienda generar rectificativa). Según AEAT: Si los errores detectados
|
|
465
|
+
tras la emisión NO están contemplados en el ROF, pero afectan a campos
|
|
466
|
+
del registro de facturación (RF) generado al emitir la factura (que,
|
|
467
|
+
digamos, “no se ven” en la factura impresa, es decir, son campos
|
|
468
|
+
“internos”, como ciertas codificaciones tributarias), se debe corregir
|
|
469
|
+
la factura original (esos datos “internos” de la misma) y se debe
|
|
470
|
+
generar un RF de alta de subsanación de esa factura donde conste ya la
|
|
471
|
+
nueva información que proceda. Estos casos deberían ser MUY POCO
|
|
472
|
+
FRECUENTES. 2 - Anulación de facturas enviadas (AEAT recomienda generar
|
|
473
|
+
rectificativa). Según AEAT: “Si se considera que “toda la factura” en sí
|
|
474
|
+
misma está mal o no debería haberse emitido, siempre que para
|
|
475
|
+
solucionarlo no deba emplearse algún procedimiento (de rectificativa u
|
|
476
|
+
otro) previsto en el ROF, se podrá “anular” generando para ello un RF de
|
|
477
|
+
anulación. Estos casos deberían ser MUY POCO FRECUENTES.”</p>
|
|
449
478
|
</div>
|
|
450
479
|
<div class="section" id="bug-tracker">
|
|
451
480
|
<h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
|
|
452
481
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-spain/issues">GitHub Issues</a>.
|
|
453
482
|
In case of trouble, please check there if your issue has already been reported.
|
|
454
483
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
455
|
-
<a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_verifactu_oca%0Aversion:%
|
|
484
|
+
<a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_verifactu_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
456
485
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
457
486
|
</div>
|
|
458
487
|
<div class="section" id="credits">
|
|
@@ -468,22 +497,34 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
468
497
|
<div class="section" id="contributors">
|
|
469
498
|
<h3><a class="toc-backref" href="#toc-entry-8">Contributors</a></h3>
|
|
470
499
|
<ul class="simple">
|
|
471
|
-
<li>Aures TIC
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
<li>
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
<li>
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
500
|
+
<li>Aures TIC:<ul>
|
|
501
|
+
<li>Jose Zambudio</li>
|
|
502
|
+
<li>Almudena de La Puente</li>
|
|
503
|
+
<li>Anna Martínez</li>
|
|
504
|
+
</ul>
|
|
505
|
+
</li>
|
|
506
|
+
<li>ForgeFlow S.L.:<ul>
|
|
507
|
+
<li>Laura Cazorla</li>
|
|
508
|
+
<li>Andreu Orensanz</li>
|
|
509
|
+
<li>Jordi Ballester</li>
|
|
510
|
+
</ul>
|
|
511
|
+
</li>
|
|
512
|
+
<li>Ozono multimedia:<ul>
|
|
513
|
+
<li>Iván Antón</li>
|
|
514
|
+
</ul>
|
|
515
|
+
</li>
|
|
516
|
+
<li>SDi:<ul>
|
|
517
|
+
<li>Fernando La Chica</li>
|
|
518
|
+
</ul>
|
|
519
|
+
</li>
|
|
520
|
+
<li>Process control:<ul>
|
|
521
|
+
<li>Jorge Luis López</li>
|
|
522
|
+
</ul>
|
|
523
|
+
</li>
|
|
524
|
+
<li>Tecnativa:<ul>
|
|
525
|
+
<li>Pedro M. Baeza</li>
|
|
526
|
+
</ul>
|
|
527
|
+
</li>
|
|
487
528
|
</ul>
|
|
488
529
|
</div>
|
|
489
530
|
<div class="section" id="maintainers">
|
|
@@ -495,7 +536,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
495
536
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
496
537
|
mission is to support the collaborative development of Odoo features and
|
|
497
538
|
promote its widespread use.</p>
|
|
498
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/
|
|
539
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/17.0/l10n_es_verifactu_oca">OCA/l10n-spain</a> project on GitHub.</p>
|
|
499
540
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
500
541
|
</div>
|
|
501
542
|
</div>
|
|
@@ -17,12 +17,12 @@ class TestVerifactuCommon(TestL10nEsAeatModBase, TestL10nEsAeatCertificateBase):
|
|
|
17
17
|
def setUpClass(cls):
|
|
18
18
|
super().setUpClass()
|
|
19
19
|
cls.maxDiff = None
|
|
20
|
-
cls.fp_nacional = cls.env.ref(f"
|
|
20
|
+
cls.fp_nacional = cls.env.ref(f"account.{cls.company.id}_fp_nacional")
|
|
21
21
|
cls.fp_registration_key_01 = cls.env.ref(
|
|
22
22
|
"l10n_es_verifactu_oca.verifactu_registration_keys_01"
|
|
23
23
|
)
|
|
24
24
|
cls.fp_nacional.verifactu_registration_key = cls.fp_registration_key_01
|
|
25
|
-
cls.fp_recargo = cls.env.ref(f"
|
|
25
|
+
cls.fp_recargo = cls.env.ref(f"account.{cls.company.id}_fp_recargo")
|
|
26
26
|
cls.fp_recargo.verifactu_registration_key = cls.fp_registration_key_01
|
|
27
27
|
cls.partner = cls.env["res.partner"].create(
|
|
28
28
|
{
|
|
@@ -33,7 +33,7 @@ class TestVerifactuCommon(TestL10nEsAeatModBase, TestL10nEsAeatCertificateBase):
|
|
|
33
33
|
)
|
|
34
34
|
cls.product = cls.env["product.product"].create({"name": "Test product"})
|
|
35
35
|
cls.account_expense = cls.env.ref(
|
|
36
|
-
"
|
|
36
|
+
"account.%s_account_common_600" % cls.company.id
|
|
37
37
|
)
|
|
38
38
|
cls.verifactu_developer = cls.env["verifactu.developer"].create(
|
|
39
39
|
{
|
|
@@ -153,7 +153,8 @@ class TestVerifactuCommon(TestL10nEsAeatModBase, TestL10nEsAeatCertificateBase):
|
|
|
153
153
|
|
|
154
154
|
Args:
|
|
155
155
|
name: Company name
|
|
156
|
-
vat: Company VAT number (must be in valid Spanish format without country
|
|
156
|
+
vat: Company VAT number (must be in valid Spanish format without country
|
|
157
|
+
code)
|
|
157
158
|
verifactu_enabled: Enable verifactu for the company
|
|
158
159
|
verifactu_test: Set verifactu test mode
|
|
159
160
|
|
|
@@ -163,9 +164,8 @@ class TestVerifactuCommon(TestL10nEsAeatModBase, TestL10nEsAeatCertificateBase):
|
|
|
163
164
|
company = self.env["res.company"].create(
|
|
164
165
|
{"name": name, "vat": vat, "country_id": self.env.ref("base.es").id}
|
|
165
166
|
)
|
|
166
|
-
if not company.
|
|
167
|
-
|
|
168
|
-
coa.try_loading(company=company, install_demo=False)
|
|
167
|
+
if not company.chart_template:
|
|
168
|
+
self.env["account.chart.template"].try_loading("es_pymes", company=company)
|
|
169
169
|
company.write(
|
|
170
170
|
{
|
|
171
171
|
"verifactu_enabled": verifactu_enabled,
|
|
@@ -257,7 +257,8 @@ class TestVerifactuCommon(TestL10nEsAeatModBase, TestL10nEsAeatCertificateBase):
|
|
|
257
257
|
self.assertEqual(
|
|
258
258
|
response_line.entry_id.document_id,
|
|
259
259
|
invoice,
|
|
260
|
-
"Response line should reference the original invoice through verifactu
|
|
260
|
+
"Response line should reference the original invoice through verifactu "
|
|
261
|
+
"entry",
|
|
261
262
|
)
|
|
262
263
|
return True
|
|
263
264
|
|
|
@@ -14,7 +14,7 @@ from freezegun import freeze_time
|
|
|
14
14
|
|
|
15
15
|
from odoo import Command
|
|
16
16
|
from odoo.exceptions import UserError
|
|
17
|
-
from odoo.
|
|
17
|
+
from odoo.tools.misc import file_path
|
|
18
18
|
|
|
19
19
|
from .common import TestVerifactuCommon
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ from .common import TestVerifactuCommon
|
|
|
22
22
|
class TestL10nEsAeatVerifactu(TestVerifactuCommon):
|
|
23
23
|
def test_verifactu_hash_code(self):
|
|
24
24
|
# based on AEAT VERI*FACTU documentation
|
|
25
|
-
# https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Veri-Factu_especificaciones_huella_hash_registros.pdf # noqa:
|
|
25
|
+
# https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Veri-Factu_especificaciones_huella_hash_registros.pdf # noqa: E501
|
|
26
26
|
expected_hash = (
|
|
27
27
|
"6FA5B3FA912C71B23C274952AA00E13A5F40F0CEE466640FFAAD041FA8B79BFF"
|
|
28
28
|
)
|
|
@@ -51,9 +51,7 @@ class TestL10nEsAeatVerifactu(TestVerifactuCommon):
|
|
|
51
51
|
if "." in tax:
|
|
52
52
|
xml_id = tax
|
|
53
53
|
else:
|
|
54
|
-
xml_id = "
|
|
55
|
-
self.company.id, tax
|
|
56
|
-
)
|
|
54
|
+
xml_id = f"account.{self.company.id}_account_tax_template_{tax}"
|
|
57
55
|
taxes += self.env.ref(xml_id)
|
|
58
56
|
tax_names.append(tax)
|
|
59
57
|
vals.append({"price_unit": line[0], "taxes": taxes})
|
|
@@ -106,10 +104,10 @@ class TestL10nEsAeatVerifactu(TestVerifactuCommon):
|
|
|
106
104
|
result_dict["RegistroAlta"].pop("FechaHoraHusoGenRegistro")
|
|
107
105
|
result_dict["RegistroAlta"].pop("TipoHuella")
|
|
108
106
|
result_dict["RegistroAlta"].pop("Huella")
|
|
109
|
-
path =
|
|
107
|
+
path = file_path(f"{module}/tests/json/{json_file}")
|
|
110
108
|
if not path:
|
|
111
109
|
raise Exception("Incorrect JSON file: %s" % json_file)
|
|
112
|
-
with open(path
|
|
110
|
+
with open(path) as f:
|
|
113
111
|
expected_dict = json.loads(f.read())
|
|
114
112
|
self.assertEqual(expected_dict, result_dict)
|
|
115
113
|
entry = invoice.last_verifactu_invoice_entry_id
|
|
@@ -265,10 +263,10 @@ class TestL10nEsAeatVerifactuQR(TestVerifactuCommon):
|
|
|
265
263
|
mock_service = MagicMock()
|
|
266
264
|
module = "l10n_es_verifactu_oca"
|
|
267
265
|
json_file = "verifactu_mocked_response_1.json"
|
|
268
|
-
path =
|
|
266
|
+
path = file_path(f"{module}/tests/json/{json_file}")
|
|
269
267
|
if not path:
|
|
270
268
|
raise Exception("Incorrect JSON file: %s" % json_file)
|
|
271
|
-
with open(path
|
|
269
|
+
with open(path) as f:
|
|
272
270
|
response_dict = json.loads(f.read())
|
|
273
271
|
mock_service.RegFactuSistemaFacturacion.return_value = response_dict
|
|
274
272
|
mock_connect.return_value = mock_service
|
|
@@ -370,10 +368,10 @@ class TestVerifactuSendResponse(TestVerifactuCommon):
|
|
|
370
368
|
mock_service = MagicMock()
|
|
371
369
|
module = "l10n_es_verifactu_oca"
|
|
372
370
|
json_file = "verifactu_mocked_response_2.json"
|
|
373
|
-
path =
|
|
371
|
+
path = file_path(f"{module}/tests/json/{json_file}")
|
|
374
372
|
if not path:
|
|
375
373
|
raise Exception("Incorrect JSON file: %s" % json_file)
|
|
376
|
-
with open(path
|
|
374
|
+
with open(path) as f:
|
|
377
375
|
response_dict = json.loads(f.read())
|
|
378
376
|
mock_service.RegFactuSistemaFacturacion.return_value = response_dict
|
|
379
377
|
mock_connect.return_value = mock_service
|
|
@@ -12,15 +12,13 @@
|
|
|
12
12
|
expr="//field[@name='restrict_mode_hash_table']"
|
|
13
13
|
position="attributes"
|
|
14
14
|
>
|
|
15
|
-
<attribute
|
|
16
|
-
name="attrs"
|
|
17
|
-
>{'readonly': [('restrict_mode_hash_table_readonly', '=', True)]}</attribute>
|
|
15
|
+
<attribute name="readonly">restrict_mode_hash_table_readonly</attribute>
|
|
18
16
|
</xpath>
|
|
19
17
|
<xpath expr="//field[@name='restrict_mode_hash_table']" position="before">
|
|
20
18
|
<field name="company_verifactu_enabled" invisible="1" />
|
|
21
19
|
<field
|
|
22
20
|
name="verifactu_enabled"
|
|
23
|
-
|
|
21
|
+
invisible="not company_verifactu_enabled or type != 'sale'"
|
|
24
22
|
/>
|
|
25
23
|
</xpath>
|
|
26
24
|
</field>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
2
|
<!-- Copyright 2024 Aures TIC - Jose Zambudio
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Copyright 2024 Aures TIC - Almudena de La Puente
|
|
4
|
+
Copyright 2025 Tecnativa - Pedro M. Baeza
|
|
5
|
+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
|
5
6
|
<odoo>
|
|
6
7
|
<record id="invoice_verifactu_form" model="ir.ui.view">
|
|
7
8
|
<field name="name">account.invoice.verifactu.form</field>
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
string="Re-send to VERI*FACTU"
|
|
15
16
|
name="resend_verifactu"
|
|
16
17
|
groups="l10n_es_aeat.group_account_aeat"
|
|
17
|
-
|
|
18
|
+
invisible="not verifactu_enabled or state != 'posted' or aeat_state != 'sent_w_errors'"
|
|
18
19
|
/>
|
|
19
20
|
</button>
|
|
20
21
|
<notebook position="inside">
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
<page
|
|
26
27
|
string="VERI*FACTU"
|
|
27
28
|
name="page_aeat"
|
|
28
|
-
|
|
29
|
+
invisible="not verifactu_enabled"
|
|
29
30
|
>
|
|
30
31
|
<group>
|
|
31
32
|
<group
|
|
@@ -36,22 +37,25 @@
|
|
|
36
37
|
<field
|
|
37
38
|
name="verifactu_refund_type"
|
|
38
39
|
string="Refund type"
|
|
39
|
-
|
|
40
|
+
required="verifactu_enabled and move_type == 'out_refund'"
|
|
41
|
+
invisible="not verifactu_enabled or move_type != 'out_refund'"
|
|
40
42
|
/>
|
|
41
43
|
<field
|
|
42
44
|
name="verifactu_refund_specific_type"
|
|
43
45
|
string="Refund specific type"
|
|
44
|
-
|
|
46
|
+
invisible="not verifactu_enabled or move_type != 'out_refund'"
|
|
45
47
|
/>
|
|
46
48
|
<field
|
|
47
49
|
name="verifactu_tax_key"
|
|
48
50
|
string="Tax key"
|
|
49
|
-
|
|
51
|
+
required="verifactu_enabled"
|
|
52
|
+
readonly="aeat_state == 'sent'"
|
|
50
53
|
/>
|
|
51
54
|
<field
|
|
52
55
|
name="verifactu_registration_key"
|
|
53
56
|
string="Registration key"
|
|
54
|
-
|
|
57
|
+
required="verifactu_enabled"
|
|
58
|
+
readonly="aeat_state == 'sent'"
|
|
55
59
|
/>
|
|
56
60
|
<field name="verifactu_description" string="Description" />
|
|
57
61
|
</group>
|
|
@@ -88,12 +92,12 @@
|
|
|
88
92
|
<field
|
|
89
93
|
name="aeat_send_failed"
|
|
90
94
|
string="Failed?"
|
|
91
|
-
|
|
95
|
+
invisible="not aeat_send_failed"
|
|
92
96
|
/>
|
|
93
97
|
<field
|
|
94
98
|
name="aeat_send_error"
|
|
95
99
|
string="Send error"
|
|
96
|
-
|
|
100
|
+
invisible="not aeat_send_failed"
|
|
97
101
|
/>
|
|
98
102
|
</group>
|
|
99
103
|
</page>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
2
|
<odoo>
|
|
3
|
-
|
|
4
3
|
<template
|
|
5
4
|
id="report_invoice_document"
|
|
6
5
|
inherit_id="account.report_invoice_document"
|
|
@@ -13,12 +12,11 @@
|
|
|
13
12
|
/>
|
|
14
13
|
</xpath>
|
|
15
14
|
</template>
|
|
16
|
-
|
|
17
15
|
<template id="address_layout" inherit_id="web.address_layout" priority="1000">
|
|
18
|
-
<div class="address row" position="attributes">
|
|
16
|
+
<div class="address row " position="attributes">
|
|
19
17
|
<attribute name="t-if">not verifactu_invoice</attribute>
|
|
20
18
|
</div>
|
|
21
|
-
<div class="address row" position="after">
|
|
19
|
+
<div class="address row " position="after">
|
|
22
20
|
<div t-if="verifactu_invoice" class="row" id="verifactu_row">
|
|
23
21
|
<div
|
|
24
22
|
id="verifactu"
|
|
@@ -52,5 +50,4 @@
|
|
|
52
50
|
</div>
|
|
53
51
|
</div>
|
|
54
52
|
</template>
|
|
55
|
-
|
|
56
53
|
</odoo>
|
|
@@ -12,22 +12,22 @@
|
|
|
12
12
|
<group name="verifactu_enabled">
|
|
13
13
|
<field name="verifactu_enabled" string="Enabled?" />
|
|
14
14
|
</group>
|
|
15
|
-
<group
|
|
15
|
+
<group invisible="not verifactu_enabled">
|
|
16
16
|
<group name="verifactu_config">
|
|
17
17
|
<field name="verifactu_test" string="Test environment?" />
|
|
18
18
|
<field name="verifactu_start_date" string="Start date" />
|
|
19
19
|
</group>
|
|
20
20
|
</group>
|
|
21
|
-
<group
|
|
21
|
+
<group invisible="not verifactu_enabled">
|
|
22
22
|
<group name="verifactu_verifactu_chaining">
|
|
23
23
|
<field
|
|
24
24
|
name="verifactu_chaining_id"
|
|
25
25
|
string="Chaining reference"
|
|
26
|
-
|
|
26
|
+
required="verifactu_enabled"
|
|
27
27
|
/>
|
|
28
28
|
</group>
|
|
29
29
|
</group>
|
|
30
|
-
<group
|
|
30
|
+
<group invisible="not verifactu_enabled">
|
|
31
31
|
<group name="verifactu_description">
|
|
32
32
|
<field
|
|
33
33
|
name="verifactu_description"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
/>
|
|
36
36
|
</group>
|
|
37
37
|
</group>
|
|
38
|
-
<group
|
|
38
|
+
<group invisible="not verifactu_enabled">
|
|
39
39
|
<group name="verifactu_developer_id">
|
|
40
40
|
<field
|
|
41
41
|
name="verifactu_developer_id"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
-
<!--
|
|
3
|
-
|
|
2
|
+
<!-- Copyright 2024 Aures TIC - Almudena de La Puente
|
|
3
|
+
Copyright 2025 Tecnativa - Pedro M. Baeza
|
|
4
|
+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
|
4
5
|
<odoo>
|
|
5
6
|
<record id="l10n_es_verifactu_map_lines_view_tree" model="ir.ui.view">
|
|
6
7
|
<field name="model">verifactu.map.line</field>
|
|
@@ -8,11 +9,7 @@
|
|
|
8
9
|
<tree editable="bottom">
|
|
9
10
|
<field name="code" />
|
|
10
11
|
<field name="name" />
|
|
11
|
-
<field
|
|
12
|
-
name="taxes"
|
|
13
|
-
widget="many2many_tags"
|
|
14
|
-
domain="[('type_tax_use', '=', 'sale')]"
|
|
15
|
-
/>
|
|
12
|
+
<field name="tax_xmlid_ids" widget="many2many_tags" />
|
|
16
13
|
</tree>
|
|
17
14
|
</field>
|
|
18
15
|
</record>
|