Skip to content

Commit 1d9adb7

Browse files
victoralmaupedrobaeza
authored andcommitted
[MIG] l10n_es_intrastat_report: Migration to 19.0
TT61941
1 parent 65e4d93 commit 1d9adb7

8 files changed

Lines changed: 26 additions & 266 deletions

File tree

l10n_es_intrastat_report/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Intrastat Product Declaration for Spain
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_intrastat_report
24+
:target: https://github.com/OCA/l10n-spain/tree/19.0/l10n_es_intrastat_report
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_intrastat_report
27+
:target: https://translation.odoo-community.org/projects/l10n-spain-19-0/l10n-spain-19-0-l10n_es_intrastat_report
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|
@@ -155,7 +155,7 @@ Bug Tracker
155155
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-spain/issues>`_.
156156
In case of trouble, please check there if your issue has already been reported.
157157
If you spotted it first, help us to smash it by providing a detailed and welcomed
158-
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_intrastat_report%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
158+
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_intrastat_report%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
159159

160160
Do not contact contributors directly about support or help with technical issues.
161161

@@ -205,6 +205,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
205205
mission is to support the collaborative development of Odoo features and
206206
promote its widespread use.
207207

208-
This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_intrastat_report>`_ project on GitHub.
208+
This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/19.0/l10n_es_intrastat_report>`_ project on GitHub.
209209

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

l10n_es_intrastat_report/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{
1010
"name": "Intrastat Product Declaration for Spain",
11-
"version": "18.0.1.2.3",
11+
"version": "19.0.1.0.0",
1212
"category": "Intrastat",
1313
"license": "AGPL-3",
1414
"summary": "Spanish Intrastat Product Declaration",

l10n_es_intrastat_report/i18n/ca.po

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -324,121 +324,3 @@ msgstr "Missatges del web"
324324
#: model:ir.model.fields,help:l10n_es_intrastat_report.field_intrastat_product_declaration__website_message_ids
325325
msgid "Website communication history"
326326
msgstr "Historial de comunicació del web"
327-
328-
#~ msgid "Amount Company Currency"
329-
#~ msgstr "Import en moneda de la companyia"
330-
331-
#~ msgid "Weight"
332-
#~ msgstr "Pes"
333-
334-
#~ msgid "Search Spanish Intrastat Product Declaration"
335-
#~ msgstr "Buscar declaració de producte Intrastat Espanyola"
336-
337-
#~ msgid "Spanish Intrastat Product Declaration"
338-
#~ msgstr "Declaració de producte Intrastat Espanyola"
339-
340-
#~ msgid "Last Modified on"
341-
#~ msgstr "Darrera modificació el"
342-
343-
#~ msgid "Main Attachment"
344-
#~ msgstr "Adjunt principal"
345-
346-
#~ msgid "Reporting Level"
347-
#~ msgstr "Nivell d'informe"
348-
349-
#~ msgid "Responsible User"
350-
#~ msgstr "Usuari responsable"
351-
352-
#~ msgid "Revision"
353-
#~ msgstr "Revisió"
354-
355-
#~ msgid "State"
356-
#~ msgstr "Província"
357-
358-
#~ msgid ""
359-
#~ "State of the declaration. When the state is set to 'Done', the parameters "
360-
#~ "become read-only."
361-
#~ msgstr ""
362-
#~ "Estat de la declaració. Quan l'estat està com a 'Realitzat', els "
363-
#~ "paràmetres es converteixen a només lectura."
364-
365-
#~ msgid ""
366-
#~ "Status based on activities\n"
367-
#~ "Overdue: Due date is already passed\n"
368-
#~ "Today: Activity date is today\n"
369-
#~ "Planned: Future activities."
370-
#~ msgstr ""
371-
#~ "Estat basat en les activitats\n"
372-
#~ "Tard: La data de venciment ja està vençuda\n"
373-
#~ "Avui: La data de l'activitat és avui\n"
374-
#~ "Planificat: Activitats futures."
375-
376-
#~ msgid "Suppl. Unit"
377-
#~ msgstr "Unit. supl."
378-
379-
#~ msgid "Suppl. Unit Qty"
380-
#~ msgstr "Quantitat unit. supl."
381-
382-
#~ msgid "Supplementary Units Quantity"
383-
#~ msgstr "Quantitat d'unitats suplementàries"
384-
385-
#~ msgid "The move of this entry line."
386-
#~ msgstr "El moviment d'aquesta línia d'entrada."
387-
388-
#~ msgid "Total Fiscal Amount"
389-
#~ msgstr "Import fiscal total"
390-
391-
#~ msgid "Total fiscal amount in company currency of the declaration."
392-
#~ msgstr "Import fiscal total de la declaració en la moneda de la companyia."
393-
394-
#~ msgid "Transport Mode"
395-
#~ msgstr "Mode de transport"
396-
397-
#~ msgid "Type"
398-
#~ msgstr "Tipus"
399-
400-
#~ msgid "Type of the exception activity on record."
401-
#~ msgstr "Tipus de l'activitat d'excepció al registre."
402-
403-
#~ msgid "Unread Messages"
404-
#~ msgstr "Missatges no llegits"
405-
406-
#~ msgid "Unread Messages Counter"
407-
#~ msgstr "Comptador de missatges no llegits"
408-
409-
#~ msgid "Used to keep track of changes"
410-
#~ msgstr "Usat per a rastrejar els canvis"
411-
412-
#~ msgid "VAT Number"
413-
#~ msgstr "NIF"
414-
415-
#~ msgid "Valid"
416-
#~ msgstr "Vàlid"
417-
418-
#~ msgid "XML Attachment"
419-
#~ msgstr "Adjunt XML"
420-
421-
#~ msgid "XML Export"
422-
#~ msgstr "Exportació XML"
423-
424-
#~ msgid "XML Filename"
425-
#~ msgstr "Nom fitxer XML"
426-
427-
#~ msgid "Year"
428-
#~ msgstr "Any"
429-
430-
#~ msgid "Year and month of the declaration."
431-
#~ msgstr "Any i mes de la declaració."
432-
433-
#~ msgid "You can add some comments here if you want."
434-
#~ msgstr "Si vol, pot afegir comentaris aquí."
435-
436-
#~ msgid "Followers (Channels)"
437-
#~ msgstr "Seguidors (Canals)"
438-
439-
#, python-format
440-
#~ msgid "xlrd library not found."
441-
#~ msgstr "Llibreria xlrd no trobada."
442-
443-
#~ msgid "Used in views and methods of localization modules."
444-
#~ msgstr "Usat en vistes i mètodes de mòduls de localització."

l10n_es_intrastat_report/i18n/es.po

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -346,126 +346,3 @@ msgstr "Mensajes del sitio web"
346346
#: model:ir.model.fields,help:l10n_es_intrastat_report.field_intrastat_product_declaration__website_message_ids
347347
msgid "Website communication history"
348348
msgstr "Historial de comunicación del sitio web"
349-
350-
#~ msgid "Amount Company Currency"
351-
#~ msgstr "Importe en la moneda de la compañía"
352-
353-
#~ msgid "Weight"
354-
#~ msgstr "Peso"
355-
356-
#~ msgid "Search Spanish Intrastat Product Declaration"
357-
#~ msgstr "Buscar declaraciones de producto Intrastat españolas"
358-
359-
#~ msgid "Spanish Intrastat Product Declaration"
360-
#~ msgstr "Declaración de producto Intrastat española"
361-
362-
#~ msgid "/&gt;"
363-
#~ msgstr "/&gt;"
364-
365-
#~ msgid "Last Modified on"
366-
#~ msgstr "Última modificación el"
367-
368-
#~ msgid "Main Attachment"
369-
#~ msgstr "Adjunto principal"
370-
371-
#~ msgid "Type of the exception activity on record."
372-
#~ msgstr "Tipo de actividad de excepción registrada."
373-
374-
#~ msgid "Unread Messages"
375-
#~ msgstr "Mensajes sin leer"
376-
377-
#~ msgid "Unread Messages Counter"
378-
#~ msgstr "Contador de mensajes sin leer"
379-
380-
#~ msgid "Used to keep track of changes"
381-
#~ msgstr "Usado para rastrear los cambios"
382-
383-
#~ msgid "Valid"
384-
#~ msgstr "Válido"
385-
386-
#~ msgid "Year"
387-
#~ msgstr "Año"
388-
389-
#~ msgid "Year and month of the declaration."
390-
#~ msgstr "Año y mes de la declaración."
391-
392-
#~ msgid "You can add some comments here if you want."
393-
#~ msgstr "Puede añadir algunos comentarios aquí si lo prefiere."
394-
395-
#~ msgid "Followers (Channels)"
396-
#~ msgstr "Seguidores (Canales)"
397-
398-
#, python-format
399-
#~ msgid "Missing origin country on product %s."
400-
#~ msgstr "Falta el país de origen en el producto %s."
401-
402-
#, python-format
403-
#~ msgid "Missing partner vat on invoice %s."
404-
#~ msgstr "Falta el NIF del contacto en la factura %s."
405-
406-
#, python-format
407-
#~ msgid "xlrd library not found."
408-
#~ msgstr "Librería xlrd no encontrada."
409-
410-
#~ msgid "Used in views and methods of localization modules."
411-
#~ msgstr "Usado en vistas y métodos de módulos de localización."
412-
413-
#~ msgid "01"
414-
#~ msgstr "01"
415-
416-
#~ msgid "02"
417-
#~ msgstr "02"
418-
419-
#~ msgid "03"
420-
#~ msgstr "03"
421-
422-
#~ msgid "04"
423-
#~ msgstr "04"
424-
425-
#~ msgid "05"
426-
#~ msgstr "05"
427-
428-
#~ msgid "06"
429-
#~ msgstr "06"
430-
431-
#~ msgid "07"
432-
#~ msgstr "07"
433-
434-
#~ msgid "08"
435-
#~ msgstr "08"
436-
437-
#~ msgid "09"
438-
#~ msgstr "09"
439-
440-
#~ msgid "10"
441-
#~ msgstr "10"
442-
443-
#~ msgid "11"
444-
#~ msgstr "11"
445-
446-
#~ msgid "12"
447-
#~ msgstr "12"
448-
449-
#~ msgid "Done"
450-
#~ msgstr "Realizado"
451-
452-
#~ msgid "Draft"
453-
#~ msgstr "Borrador"
454-
455-
#~ msgid "If checked new messages require your attention."
456-
#~ msgstr "Si está marcado, hay nuevos mensajes que requieren su atención."
457-
458-
#~ msgid "Number of error"
459-
#~ msgstr "Nº de errores"
460-
461-
#~ msgid "Select the declaration type."
462-
#~ msgstr "Seleccione el tipo de declaración."
463-
464-
#~ msgid "l10n.es.intrastat.code.import"
465-
#~ msgstr "l10n.es.intrastat.code.import"
466-
467-
#~ msgid "l10n.es.intrastat.product.computation.line"
468-
#~ msgstr "l10n.es.intrastat.product.computation.line"
469-
470-
#~ msgid "l10n.es.intrastat.product.declaration.line"
471-
#~ msgstr "l10n.es.intrastat.product.declaration.line"

l10n_es_intrastat_report/models/l10n_es_intrastat_product_declaration.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from odoo import api, fields, models
1010
from odoo.exceptions import UserError
11+
from odoo.fields import Domain
1112

1213
from odoo.addons.l10n_es_aeat.models.spanish_states_mapping import SPANISH_STATES
1314

@@ -72,13 +73,15 @@ def _prepare_invoice_domain(self):
7273
- credit notes with and without return
7374
- companies subject to arrivals or dispatches only
7475
"""
75-
domain = super()._prepare_invoice_domain()[:-1]
76+
domain = super()._prepare_invoice_domain()
7677
if self.company_id.country_id.code != "ES":
77-
return super()._prepare_invoice_domain()
78+
return domain
79+
conditions = list(domain.iter_conditions())[:-1]
80+
domain = Domain.AND(conditions)
7881
if self.declaration_type == "arrivals":
79-
domain.append(("move_type", "in", ("in_invoice", "out_refund")))
82+
domain += Domain("move_type", "in", ("in_invoice", "out_refund"))
8083
elif self.declaration_type == "dispatches":
81-
domain.append(("move_type", "in", ("out_invoice", "in_refund")))
84+
domain += Domain("move_type", "in", ("out_invoice", "in_refund"))
8285
return domain
8386

8487
def _generate_xml(self):

l10n_es_intrastat_report/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Intrastat Product Declaration for Spain</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:5d460275dd3437a31cf202bcbfe5c471b293766d0c2a61afd2ee616fffec3ebe
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_intrastat_report"><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_intrastat_report"><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_intrastat_report"><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_intrastat_report"><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>This module implements the Spanish Intrastat reporting.</p>
379379
<p>The report can be reviewed and corrected where needed before the
380380
creation of the csv file for the declaration.</p>
@@ -504,7 +504,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
504504
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-spain/issues">GitHub Issues</a>.
505505
In case of trouble, please check there if your issue has already been reported.
506506
If you spotted it first, help us to smash it by providing a detailed and welcomed
507-
<a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_intrastat_report%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
507+
<a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_intrastat_report%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
508508
<p>Do not contact contributors directly about support or help with technical issues.</p>
509509
</div>
510510
<div class="section" id="credits">
@@ -551,7 +551,7 @@ <h3><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h3>
551551
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
552552
mission is to support the collaborative development of Odoo features and
553553
promote its widespread use.</p>
554-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_intrastat_report">OCA/l10n-spain</a> project on GitHub.</p>
554+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/19.0/l10n_es_intrastat_report">OCA/l10n-spain</a> project on GitHub.</p>
555555
<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>
556556
</div>
557557
</div>

l10n_es_intrastat_report/tests/test_l10n_es_intrastat_report.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from odoo.tools import mute_logger
88

99
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
10-
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
1110

1211
from ..hooks import post_init_hook
1312

@@ -58,7 +57,6 @@ def _create_declaration(cls, declaration_type):
5857
@AccountTestInvoicingCommon.setup_chart_template("es_full")
5958
def setUpClass(cls):
6059
super().setUpClass()
61-
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
6260
# Set current company to Spanish
6361
intrastat_transport = cls.env["intrastat.transport_mode"].search([], limit=1)
6462
cls.env.user.company_id.write(
@@ -70,7 +68,7 @@ def setUpClass(cls):
7068
"vat": "ESA12345674",
7169
}
7270
)
73-
cls.env.user.groups_id += cls.env.ref("account.group_delivery_invoice_address")
71+
cls.env.user.group_ids += cls.env.ref("account.group_delivery_invoice_address")
7472
cls.fiscal_position_b2b = cls.env["account.fiscal.position"].create(
7573
{
7674
"name": "B2B FP",

0 commit comments

Comments
 (0)