From ea234e9694c29ce7cc4a83edb0fa1b1b716d8a86 Mon Sep 17 00:00:00 2001 From: Antoni Marroig Campomar Date: Mon, 28 Oct 2024 08:35:02 +0100 Subject: [PATCH] [MIG] geoengine_base_geolocalize: Migration to 17.0 --- geoengine_base_geolocalize/README.rst | 81 +++- geoengine_base_geolocalize/__manifest__.py | 2 +- .../readme/CONTRIBUTORS.md | 3 + .../readme/DESCRIPTION.md | 3 + geoengine_base_geolocalize/readme/INSTALL.md | 6 + .../static/description/index.html | 442 ++++++++++++++++++ .../tests/test_geoengine_partner.py | 12 + 7 files changed, 529 insertions(+), 20 deletions(-) create mode 100644 geoengine_base_geolocalize/readme/CONTRIBUTORS.md create mode 100644 geoengine_base_geolocalize/readme/DESCRIPTION.md create mode 100644 geoengine_base_geolocalize/readme/INSTALL.md create mode 100644 geoengine_base_geolocalize/static/description/index.html diff --git a/geoengine_base_geolocalize/README.rst b/geoengine_base_geolocalize/README.rst index ac333308ef..b5bd267f11 100644 --- a/geoengine_base_geolocalize/README.rst +++ b/geoengine_base_geolocalize/README.rst @@ -1,51 +1,94 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License - +======================================= Geospatial support for base_geolocalize ======================================= +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:d92cfbfb144aae040e97197cbecac7c6f4b663c59edb459339126e67473a5711 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-OCA%2Fgeospatial-lightgray.png?logo=github + :target: https://github.com/OCA/geospatial/tree/17.0/geoengine_base_geolocalize + :alt: OCA/geospatial +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/geospatial-17-0/geospatial-17-0-geoengine_base_geolocalize + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/geospatial&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + Geolocalise your partner based on longitude and latitude provided by -`OpenStreetMap via its Nominatim service -`_. Please read carefully the -`usage policy `_ -before using the module. +`OpenStreetMap via its Nominatim +service `__. Please read +carefully the `usage +policy `__ +before using the module. + +**Table of contents** + +.. contents:: + :local: Installation ============ -Take a look at the installation section in the description of the module +Take a look at the installation section in the description of the module 'base_geoengine'. The module also requires one additional python libs: -* `requests `_ +- `requests `__ 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 smashing it by providing a detailed and welcomed feedback -`here `_. +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 +------- + +* ACSONE SA/NV + Contributors ------------ -* Laurent Mignon +- Laurent Mignon +- `APSL-Nagarro `__: -Maintainer ----------- + - Antoni Marroig -.. image:: http://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: http://odoo-community.org +Maintainers +----------- This module is maintained by the OCA. -OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/geospatial `_ project on GitHub. -To contribute to this module, please visit http://odoo-community.org. +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/geoengine_base_geolocalize/__manifest__.py b/geoengine_base_geolocalize/__manifest__.py index 39a75ea273..a6b2b4e650 100644 --- a/geoengine_base_geolocalize/__manifest__.py +++ b/geoengine_base_geolocalize/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Geospatial support for base_geolocalize", - "version": "16.0.1.0.1", + "version": "17.0.1.0.0", "category": "GeoBI", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/geoengine_base_geolocalize/readme/CONTRIBUTORS.md b/geoengine_base_geolocalize/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..ec5970f4b1 --- /dev/null +++ b/geoengine_base_geolocalize/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Laurent Mignon \<\> +- [APSL-Nagarro](https://www.apsl.tech): + - Antoni Marroig \<\> \ No newline at end of file diff --git a/geoengine_base_geolocalize/readme/DESCRIPTION.md b/geoengine_base_geolocalize/readme/DESCRIPTION.md new file mode 100644 index 0000000000..455235eb1e --- /dev/null +++ b/geoengine_base_geolocalize/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +Geolocalise your partner based on longitude and latitude provided by +[OpenStreetMap via its Nominatim service](http://wiki.openstreetmap.org/wiki/Nominatim). Please read carefully the +[usage policy](https://operations.osmfoundation.org/policies/nominatim/) before using the module. \ No newline at end of file diff --git a/geoengine_base_geolocalize/readme/INSTALL.md b/geoengine_base_geolocalize/readme/INSTALL.md new file mode 100644 index 0000000000..19c77a886e --- /dev/null +++ b/geoengine_base_geolocalize/readme/INSTALL.md @@ -0,0 +1,6 @@ +Take a look at the installation section in the description of the module +'base_geoengine'. + +The module also requires one additional python libs: + +- [requests](https://pypi.python.org/pypi/requests) \ No newline at end of file diff --git a/geoengine_base_geolocalize/static/description/index.html b/geoengine_base_geolocalize/static/description/index.html new file mode 100644 index 0000000000..9e699fe02c --- /dev/null +++ b/geoengine_base_geolocalize/static/description/index.html @@ -0,0 +1,442 @@ + + + + + +Geospatial support for base_geolocalize + + + +
+

Geospatial support for base_geolocalize

+ + +

Beta License: AGPL-3 OCA/geospatial Translate me on Weblate Try me on Runboat

+

Geolocalise your partner based on longitude and latitude provided by +OpenStreetMap via its Nominatim +service. Please read +carefully the usage +policy +before using the module.

+

Table of contents

+ +
+

Installation

+

Take a look at the installation section in the description of the module +‘base_geoengine’.

+

The module also requires one additional python libs:

+ +
+
+

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

+
    +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/geospatial project on GitHub.

+

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

+
+
+
+ + diff --git a/geoengine_base_geolocalize/tests/test_geoengine_partner.py b/geoengine_base_geolocalize/tests/test_geoengine_partner.py index 03b86d7838..3dc86bdc76 100644 --- a/geoengine_base_geolocalize/tests/test_geoengine_partner.py +++ b/geoengine_base_geolocalize/tests/test_geoengine_partner.py @@ -1,9 +1,21 @@ # Copyright 2015-2017 ACSONE SA/NV () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +import requests + from odoo.tests.common import TransactionCase class TestGeoenginePartner(TransactionCase): + @classmethod + def setUpClass(cls): + cls._super_send = requests.Session.send + super().setUpClass() + + @classmethod + def _request_handler(cls, s, r, /, **kw): + """Don't block external requests.""" + return cls._super_send(s, r, **kw) + def test_get_geo_point(self): partner_id = self.env.ref("base.user_root").partner_id partner_id.partner_longitude = False