From 7ef84d8180c91e6605589e7829a5250d34b3547f Mon Sep 17 00:00:00 2001 From: Antoni Marroig Campomar Date: Thu, 9 Jan 2025 17:02:27 +0100 Subject: [PATCH] [IMP] : black, isort, prettier --- base_geoengine/geo_db.py | 2 +- base_geoengine/geo_operators.py | 2 +- base_geoengine/geo_view/geo_raster_layer_view.xml | 2 +- base_geoengine/geo_view/geo_vector_layer_view.xml | 2 +- base_geoengine/static/src/js/geoengine_common.js | 8 ++++---- requirements.txt | 4 ++++ setup/base_geoengine/odoo/addons/base_geoengine | 1 + setup/base_geoengine/setup.py | 6 ++++++ 8 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 requirements.txt create mode 120000 setup/base_geoengine/odoo/addons/base_geoengine create mode 100644 setup/base_geoengine/setup.py diff --git a/base_geoengine/geo_db.py b/base_geoengine/geo_db.py index 7a36c1ef2c..e4aa95ebee 100644 --- a/base_geoengine/geo_db.py +++ b/base_geoengine/geo_db.py @@ -50,7 +50,7 @@ def init_postgis(cr): "CREATE EXTENSION postgis;\n" "CREATE EXTENSION postgis_topology;\n" ) - ) + ) from None def create_geo_column(cr, tablename, columnname, geotype, srid, dim, comment=None): diff --git a/base_geoengine/geo_operators.py b/base_geoengine/geo_operators.py index cf950a0268..47841a8ddf 100644 --- a/base_geoengine/geo_operators.py +++ b/base_geoengine/geo_operators.py @@ -145,7 +145,7 @@ def get_rel_field(self, rel_col, rel_model): except Exception: raise Exception( "Model {} has no column {}".format(rel_model._name, rel_col) - ) + ) from None return "{}.{}".format(rel_model._table, rel_col) def _get_direct_como_op_sql( diff --git a/base_geoengine/geo_view/geo_raster_layer_view.xml b/base_geoengine/geo_view/geo_raster_layer_view.xml index adc9e57fd4..4e30481fdc 100644 --- a/base_geoengine/geo_view/geo_raster_layer_view.xml +++ b/base_geoengine/geo_view/geo_raster_layer_view.xml @@ -66,7 +66,7 @@ geoengine.raster.layer.tree geoengine.raster.layer - + diff --git a/base_geoengine/geo_view/geo_vector_layer_view.xml b/base_geoengine/geo_view/geo_vector_layer_view.xml index 5b6a4f5a85..97881920e8 100644 --- a/base_geoengine/geo_view/geo_vector_layer_view.xml +++ b/base_geoengine/geo_view/geo_vector_layer_view.xml @@ -67,7 +67,7 @@ geoengine.vector.layer.tree geoengine.vector.layer - + diff --git a/base_geoengine/static/src/js/geoengine_common.js b/base_geoengine/static/src/js/geoengine_common.js index e66c2b6ac1..3eb83d5145 100644 --- a/base_geoengine/static/src/js/geoengine_common.js +++ b/base_geoengine/static/src/js/geoengine_common.js @@ -82,10 +82,10 @@ odoo.define("base_geoengine.BackgroundLayers", function (require) { source_opt.projection = ol.proj.get(l.projection); // FIXME if the projection def is not available... if (source_opt.projection) { - var projectionExtent = source_opt.projection.getExtent(); - tilegrid_opt.origin = ol.extent.getTopLeft( - projectionExtent - ); + var projectionExtent = + source_opt.projection.getExtent(); + tilegrid_opt.origin = + ol.extent.getTopLeft(projectionExtent); } } // FIXME deprecated? diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..644dd4f273 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +# generated from manifests external_dependencies +geojson +shapely +simplejson diff --git a/setup/base_geoengine/odoo/addons/base_geoengine b/setup/base_geoengine/odoo/addons/base_geoengine new file mode 120000 index 0000000000..f376c93d67 --- /dev/null +++ b/setup/base_geoengine/odoo/addons/base_geoengine @@ -0,0 +1 @@ +../../../../base_geoengine \ No newline at end of file diff --git a/setup/base_geoengine/setup.py b/setup/base_geoengine/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/base_geoengine/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)