diff --git a/delivery_mrw_no_info/README.rst b/delivery_mrw_no_info/README.rst new file mode 100644 index 000000000..0e7941f7d --- /dev/null +++ b/delivery_mrw_no_info/README.rst @@ -0,0 +1,72 @@ +==================== +Delivery MRW No Info +==================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:45862b9a3c64105a3dfce5ddc1790bc89e3bc2524e8d7c26790d84b50a4eda08 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-NuoBiT%2Fodoo--addons-lightgray.png?logo=github + :target: https://github.com/NuoBiT/odoo-addons/tree/18.0/delivery_mrw_no_info + :alt: NuoBiT/odoo-addons + +|badge1| |badge2| |badge3| + +This module deals with the state when there's no tracking information +available in the carrier" + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* NuoBiT Solutions SL + +Contributors +------------ + +- `NuoBiT `__: + + - Eric Antones eantones@nuobit.com + - Deniz Gallo dgallo@nuobit.com + +Maintainers +----------- + +.. |maintainer-eantones| image:: https://github.com/eantones.png?size=40px + :target: https://github.com/eantones + :alt: eantones + +Current maintainer: + +|maintainer-eantones| + +This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/delivery_mrw_no_info/__init__.py b/delivery_mrw_no_info/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/delivery_mrw_no_info/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/delivery_mrw_no_info/__manifest__.py b/delivery_mrw_no_info/__manifest__.py new file mode 100644 index 000000000..c8b0e2bb2 --- /dev/null +++ b/delivery_mrw_no_info/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright NuoBiT Solutions - Eric Antones +# Copyright 2026 NuoBiT Solutions - Deniz Gallo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +{ + "name": "Delivery MRW No Info", + "summary": "This module deals with the state when there's no tracking " + "information available in the carrier", + "version": "18.0.1.0.0", + "category": "Shipping", + "author": "NuoBiT Solutions SL", + "website": "https://github.com/NuoBiT/odoo-addons", + "license": "AGPL-3", + "external_dependencies": {"python": ["zeep"]}, + "depends": ["delivery_mrw"], + "maintainers": ["eantones"], +} diff --git a/delivery_mrw_no_info/models/__init__.py b/delivery_mrw_no_info/models/__init__.py new file mode 100644 index 000000000..d48534f0f --- /dev/null +++ b/delivery_mrw_no_info/models/__init__.py @@ -0,0 +1 @@ +from . import mrw_request diff --git a/delivery_mrw_no_info/models/mrw_request.py b/delivery_mrw_no_info/models/mrw_request.py new file mode 100644 index 000000000..64c2eac64 --- /dev/null +++ b/delivery_mrw_no_info/models/mrw_request.py @@ -0,0 +1,38 @@ +# Copyright NuoBiT Solutions - Eric Antones +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +import datetime +import logging + +import pytz + +from odoo.addons.delivery_mrw.models.mrw_request import MRWRequest + +_logger = logging.getLogger(__name__) + +_original_get_tracking_states = MRWRequest._get_tracking_states + + +def _get_tracking_states(self, vals): + response = _original_get_tracking_states(self, vals) + if response["MensajeSeguimiento"] != "Busqueda correcta por Número de Albarán.": + response["MensajeSeguimiento"] = "Busqueda correcta por Número de Albarán." + date = datetime.datetime.now(pytz.timezone("Europe/Madrid")) + response["Seguimiento"]["Abonado"].append( + { + "SeguimientoAbonado": { + "Seguimiento": [ + { + "Estado": "60", + "EstadoDescripcion": "Información no disponible, " + "contacte con su Fq.", + "FechaEntrega": date.strftime("%d%m%Y"), + "HoraEntrega": date.strftime("%H%M"), + } + ] + } + } + ) + return response + + +MRWRequest._get_tracking_states = _get_tracking_states diff --git a/delivery_mrw_no_info/pyproject.toml b/delivery_mrw_no_info/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/delivery_mrw_no_info/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/delivery_mrw_no_info/readme/CONTRIBUTORS.md b/delivery_mrw_no_info/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..909507cba --- /dev/null +++ b/delivery_mrw_no_info/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- [NuoBiT](https://www.nuobit.com): + - Eric Antones + - Deniz Gallo diff --git a/delivery_mrw_no_info/readme/DESCRIPTION.md b/delivery_mrw_no_info/readme/DESCRIPTION.md new file mode 100644 index 000000000..8319f860c --- /dev/null +++ b/delivery_mrw_no_info/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module deals with the state when there's no tracking information +available in the carrier" diff --git a/delivery_mrw_no_info/static/description/icon.png b/delivery_mrw_no_info/static/description/icon.png new file mode 100644 index 000000000..1cd641e79 Binary files /dev/null and b/delivery_mrw_no_info/static/description/icon.png differ diff --git a/delivery_mrw_no_info/static/description/index.html b/delivery_mrw_no_info/static/description/index.html new file mode 100644 index 000000000..3f3d66b9b --- /dev/null +++ b/delivery_mrw_no_info/static/description/index.html @@ -0,0 +1,423 @@ + + + + + +Delivery MRW No Info + + + +
+

Delivery MRW No Info

+ + +

Beta License: AGPL-3 NuoBiT/odoo-addons

+

This module deals with the state when there’s no tracking information +available in the carrier”

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • NuoBiT Solutions SL
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

Current maintainer:

+

eantones

+

This module is part of the NuoBiT/odoo-addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..a23257d63 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# generated from manifests external_dependencies +zeep diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000..51e719c87 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-delivery_mrw@git+https://github.com/OCA/l10n-spain.git@refs/pull/4758/head#subdirectory=delivery_mrw