Skip to content

Commit 7c71387

Browse files
committed
[MIG] l10n_es_facturae: Migration to 19.0
1 parent 802b69d commit 7c71387

8 files changed

Lines changed: 45 additions & 41 deletions

File tree

l10n_es_facturae/README.rst

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Creación de Facturae
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github
24-
:target: https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_facturae
24+
:target: https://github.com/OCA/l10n-spain/tree/19.0/l10n_es_facturae
2525
:alt: OCA/l10n-spain
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/l10n-spain-18-0/l10n-spain-18-0-l10n_es_facturae
27+
:target: https://translation.odoo-community.org/projects/l10n-spain-19-0/l10n-spain-19-0-l10n_es_facturae
2828
:alt: Translate me on Weblate
2929
.. |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=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -133,13 +133,13 @@ cambios.
133133

134134
|usage_07|
135135

136-
.. |usage_01| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_01.png
137-
.. |usage_02| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_02.png
138-
.. |usage_03| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_03.png
139-
.. |usage_04| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_04.png
140-
.. |usage_05| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_05.png
141-
.. |usage_06| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_06.png
142-
.. |usage_07| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_07.png
136+
.. |usage_01| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_01.png
137+
.. |usage_02| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_02.png
138+
.. |usage_03| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_03.png
139+
.. |usage_04| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_04.png
140+
.. |usage_05| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_05.png
141+
.. |usage_06| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_06.png
142+
.. |usage_07| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_07.png
143143

144144
Usage
145145
=====
@@ -164,9 +164,9 @@ electrónica. Si es necesario, firme el archivo antes de descargarlo.
164164
Finalmente, una vez que tenga el archivo listo, puede subirlo al portal
165165
**FACe** para completar el proceso.
166166

167-
.. |usage_08| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_08.png
168-
.. |usage_09| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_09.png
169-
.. |usage_10| image:: https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_10.png
167+
.. |usage_08| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_08.png
168+
.. |usage_09| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_09.png
169+
.. |usage_10| image:: https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_10.png
170170

171171
Known issues / Roadmap
172172
======================
@@ -202,7 +202,7 @@ Bug Tracker
202202
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-spain/issues>`_.
203203
In case of trouble, please check there if your issue has already been reported.
204204
If you spotted it first, help us to smash it by providing a detailed and welcomed
205-
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_facturae%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
205+
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_facturae%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
206206

207207
Do not contact contributors directly about support or help with technical issues.
208208

@@ -236,6 +236,7 @@ Contributors
236236
- Eric Antones (eantones@nuobit.com>
237237
- Alberto Martínez (alberto.martinez@sygel.es)
238238
- Carolina Fernandez (http://www.tecnativa.com)
239+
- Alex Garcia (alex@studio73.es)
239240

240241
Maintainers
241242
-----------
@@ -258,6 +259,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
258259

259260
|maintainer-etobella|
260261

261-
This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_facturae>`_ project on GitHub.
262+
This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/19.0/l10n_es_facturae>`_ project on GitHub.
262263

263264
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

l10n_es_facturae/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
{
1414
"name": "Creación de Facturae",
15-
"version": "18.0.1.2.1",
15+
"version": "19.0.1.0.0",
1616
"author": "ASR-OSS, "
1717
"FactorLibre, "
1818
"Tecon, "
@@ -24,7 +24,7 @@
2424
"website": "https://github.com/OCA/l10n-spain",
2525
"license": "AGPL-3",
2626
"depends": [
27-
"account_payment_partner",
27+
"account_payment_mode",
2828
"l10n_es_partner",
2929
"l10n_es",
3030
"base_iso3166",

l10n_es_facturae/models/account_move.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def validate_facturae_fields(self):
157157
for line in lines:
158158
if not line.tax_ids:
159159
raise ValidationError(
160-
self.env._("Taxes not provided in move line %s") % line.name
160+
self.env._("Taxes not provided in move line %s", line.name)
161161
)
162162
if self.state not in self._get_valid_move_statuses():
163163
raise ValidationError(
@@ -217,7 +217,7 @@ def _get_facturae_move_attachments(self):
217217
"data": base64.b64encode(content).decode("utf-8"),
218218
"content_type": content_type,
219219
"encoding": "BASE64",
220-
"description": self.env._("Invoice %s") % self.name,
220+
"description": self.env._("Invoice %s", self.name),
221221
"compression": False,
222222
}
223223
)

l10n_es_facturae/models/res_currency.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ class ResCurrency(models.Model):
88
_inherit = "res.currency"
99

1010
def get_current_rate(self):
11-
date = self._context.get("date") or fields.Datetime.now()
11+
date = self.env.context.get("date") or fields.Datetime.now()
1212
company_id = (
13-
self._context.get("company_id") or self.env["res.users"]._get_company().id
13+
self.env.context.get("company_id")
14+
or self.env["res.users"]._get_company().id
1415
)
1516
rate = self.env["res.currency.rate"].search(
1617
[

l10n_es_facturae/readme/CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
- Eric Antones (<eantones@nuobit.com>\>
1313
- Alberto Martínez (<alberto.martinez@sygel.es>)
1414
- Carolina Fernandez (<http://www.tecnativa.com>)
15+
- Alex Garcia (<alex@studio73.es>)

l10n_es_facturae/reports/report_facturae_signed.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,22 @@ def _validate_facturae(self, move, xml_string):
6969
"XML Schema Definition. The generated XML file and the "
7070
"full error have been written in the server logs. Here "
7171
"is the error, which may give you an idea on the cause "
72-
"of the problem : %s"
72+
"of the problem : %s",
73+
str(e),
7374
)
74-
% str(e)
7575
) from e
7676
return True
7777

7878
def _sign_file(self, move, request, public_cert, private_key):
7979
rand_min = 1
8080
rand_max = 99999
81-
signature_id = "Signature%05d" % random.randint(rand_min, rand_max)
82-
signed_properties_id = signature_id + "-SignedProperties%05d" % random.randint(
83-
rand_min, rand_max
81+
signature_id = f"Signature{random.randint(rand_min, rand_max):05d}"
82+
signed_properties_id = (
83+
f"{signature_id}-SignedProperties{random.randint(rand_min, rand_max):05d}"
8484
)
85-
key_info_id = "KeyInfo%05d" % random.randint(rand_min, rand_max)
86-
reference_id = "Reference%05d" % random.randint(rand_min, rand_max)
87-
object_id = "Object%05d" % random.randint(rand_min, rand_max)
85+
key_info_id = f"KeyInfo{random.randint(rand_min, rand_max):05d}"
86+
reference_id = f"Reference{random.randint(rand_min, rand_max):05d}"
87+
object_id = f"Object{random.randint(rand_min, rand_max):05d}"
8888
etsi = "http://uri.etsi.org/01903/v1.3.2#"
8989
sig_policy_identifier = (
9090
"http://www.facturae.es/"

l10n_es_facturae/static/description/index.html

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Creación de Facturae</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:a8773bd4dabe44703b1e87c44fc0b7eb4346156120fbf82b807e45b1ff379a7e
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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/18.0/l10n_es_facturae"><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-18-0/l10n-spain-18-0-l10n_es_facturae"><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&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
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/19.0/l10n_es_facturae"><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-19-0/l10n-spain-19-0-l10n_es_facturae"><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&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>En virtud de la Ley 25/2013, de 27 de diciembre, de impulso de la
379379
factura electrónica y creación del registro contable de facturas en el
380380
Sector Público, desde el día 15 de enero de 2015 todas las facturas
@@ -448,19 +448,19 @@ <h2><a class="toc-backref" href="#toc-entry-3">Configuration</a></h2>
448448
<strong>Contactos</strong>, seleccione la <strong>ficha del cliente</strong> correspondiente y
449449
acceda a la sección de <strong>Facturación/Contabilidad</strong>, específicamente al
450450
apartado de <strong>Facturae</strong>.</p>
451-
<p><img alt="usage_01" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_01.png" /> <img alt="usage_02" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_02.png" /></p>
451+
<p><img alt="usage_01" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_01.png" /> <img alt="usage_02" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_02.png" /></p>
452452
<p>Aquí debe <strong>activar la casilla</strong> correspondiente, seleccionar la
453453
<strong>versión de Facturae</strong> que utilizará y añadir los <strong>códigos</strong>
454454
necesarios para completar esta configuración.</p>
455-
<p><img alt="usage_03" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_03.png" /></p>
455+
<p><img alt="usage_03" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_03.png" /></p>
456456
<ol class="arabic simple" start="2">
457457
<li><strong>Completar la información de la compañía propia:</strong></li>
458458
</ol>
459459
<p>Una vez configurados los contactos, es importante asegurarse de que la
460460
información de su propia compañía esté completa. Para ello, acceda a la
461461
ficha de su empresa en <strong>ajustes</strong> y añada todos los datos requeridos,
462462
incluyendo la <strong>versión de Facturae</strong> que utilizará.</p>
463-
<p><img alt="usage_04" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_04.png" /> <img alt="usage_05" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_05.png" /></p>
463+
<p><img alt="usage_04" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_04.png" /> <img alt="usage_05" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_05.png" /></p>
464464
<p>Este paso es fundamental para que las facturas electrónicas se generen
465465
correctamente y cumplan con los estándares exigidos.</p>
466466
<ol class="arabic simple" start="3">
@@ -471,25 +471,25 @@ <h2><a class="toc-backref" href="#toc-entry-3">Configuration</a></h2>
471471
<strong>Facturación/Contabilidad</strong>, acceda al apartado de <strong>Configuración</strong> y
472472
seleccione Certificados AEAT.</p>
473473
<p>En esta pantalla, haga clic en <strong>Nuevo</strong> para crear un registro para su
474-
certificado. <img alt="usage_06" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_06.png" /></p>
474+
certificado. <img alt="usage_06" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_06.png" /></p>
475475
<p>Asígnele un nombre y suba el archivo correspondiente. Una vez cargado el
476476
certificado, haga clic en la opción de <strong>Obtener claves</strong> y guarde los
477477
cambios.</p>
478-
<p><img alt="usage_07" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_07.png" /></p>
478+
<p><img alt="usage_07" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_07.png" /></p>
479479
</div>
480480
<div class="section" id="usage">
481481
<h2><a class="toc-backref" href="#toc-entry-4">Usage</a></h2>
482482
<p><strong>Descargue el archivo de facturae</strong></p>
483483
<p>Con la configuración lista, ya puede proceder a emitir sus facturas
484484
electrónicas. Para ello, acceda a <strong>Facturación/Contabilidad</strong>, entre en
485-
el menú de <strong>Clientes</strong> y seleccione <strong>Facturas</strong>. <img alt="usage_08" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_08.png" /></p>
485+
el menú de <strong>Clientes</strong> y seleccione <strong>Facturas</strong>. <img alt="usage_08" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_08.png" /></p>
486486
<p>Haga clic en <strong>Nuevo</strong> para crear una nueva factura. Complete toda la
487487
información necesaria, guarde los datos, y luego seleccione el icono de
488488
<strong>engranaje de Acción</strong>.</p>
489-
<p><img alt="usage_09" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_09.png" /></p>
489+
<p><img alt="usage_09" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_09.png" /></p>
490490
<p>Aquí encontrará la opción para descargar el archivo de la factura
491491
electrónica. Si es necesario, firme el archivo antes de descargarlo.</p>
492-
<p><img alt="usage_10" src="https://raw.githubusercontent.com/OCA/l10n-spain/18.0/l10n_es_facturae/static/description/usage_10.png" /></p>
492+
<p><img alt="usage_10" src="https://raw.githubusercontent.com/OCA/l10n-spain/19.0/l10n_es_facturae/static/description/usage_10.png" /></p>
493493
<p>Finalmente, una vez que tenga el archivo listo, puede subirlo al portal
494494
<strong>FACe</strong> para completar el proceso.</p>
495495
</div>
@@ -525,7 +525,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Bug Tracker</a></h2>
525525
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-spain/issues">GitHub Issues</a>.
526526
In case of trouble, please check there if your issue has already been reported.
527527
If you spotted it first, help us to smash it by providing a detailed and welcomed
528-
<a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_facturae%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
528+
<a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_facturae%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
529529
<p>Do not contact contributors directly about support or help with technical issues.</p>
530530
</div>
531531
<div class="section" id="credits">
@@ -558,6 +558,7 @@ <h3><a class="toc-backref" href="#toc-entry-11">Contributors</a></h3>
558558
<li>Eric Antones (<a class="reference external" href="mailto:eantones&#64;nuobit.com">eantones&#64;nuobit.com</a>&gt;</li>
559559
<li>Alberto Martínez (<a class="reference external" href="mailto:alberto.martinez&#64;sygel.es">alberto.martinez&#64;sygel.es</a>)</li>
560560
<li>Carolina Fernandez (<a class="reference external" href="http://www.tecnativa.com">http://www.tecnativa.com</a>)</li>
561+
<li>Alex Garcia (<a class="reference external" href="mailto:alex&#64;studio73.es">alex&#64;studio73.es</a>)</li>
561562
</ul>
562563
</div>
563564
<div class="section" id="maintainers">
@@ -571,7 +572,7 @@ <h3><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h3>
571572
promote its widespread use.</p>
572573
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
573574
<p><a class="reference external image-reference" href="https://github.com/etobella"><img alt="etobella" src="https://github.com/etobella.png?size=40px" /></a></p>
574-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_facturae">OCA/l10n-spain</a> project on GitHub.</p>
575+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/19.0/l10n_es_facturae">OCA/l10n-spain</a> project on GitHub.</p>
575576
<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>
576577
</div>
577578
</div>

l10n_es_facturae/views/res_partner_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<xpath expr="/form" position="inside">
2525
<field name="facturae" invisible="1" />
2626
</xpath>
27-
<group name="accounting_entries" position="after">
27+
<group id="invoice_send_settings" position="after">
2828
<group
2929
name="group_facturae"
3030
string="Facturae"

0 commit comments

Comments
 (0)