Skip to content

Commit

Permalink
Merge PR #366 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Apr 24, 2024
2 parents e8e6b94 + 76c184a commit 12150f3
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 71 deletions.
7 changes: 3 additions & 4 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.14.2
_commit: v1.20
_src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: GitHub
dependency_installation_mode: OCA
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
github_check_license: true
github_ci_extra_env: {}
Expand All @@ -11,6 +11,7 @@ github_enable_makepot: true
github_enable_stale_action: true
github_enforce_dev_status_compatibility: true
include_wkhtmltopdf: false
odoo_test_flavor: Both
odoo_version: 12.0
org_name: Odoo Community Association (OCA)
org_slug: OCA
Expand Down Expand Up @@ -58,6 +59,4 @@ repo_description: 'This project will enable real life GIS support on Odoo/OpenER
repo_name: Geospatial Addons for Odoo
repo_slug: geospatial
repo_website: https://github.com/OCA/geospatial
travis_apt_packages: []
travis_apt_sources: []

11 changes: 10 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.6"
Expand All @@ -27,6 +27,15 @@ jobs:
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
env:
# Consider valid a PR that changes README fragments but doesn't
# change the README.rst file itself. It's not really a problem
# because the bot will update it anyway after merge. This way, we
# lower the barrier for functional contributors that want to fix the
# readme fragments, while still letting developers get README
# auto-generated (which also helps functionals when using runboat).
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
SKIP: oca-gen-addon-readme
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
name: Detect unreleased dependencies
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
for reqfile in requirements.txt test-requirements.txt ; do
if [ -f ${reqfile} ] ; then
Expand All @@ -36,10 +36,10 @@ jobs:
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
makepot: "true"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest
name: test with OCB
makepot: "true"
services:
postgres:
image: postgis/postgis:9.6-3.2
Expand All @@ -50,7 +50,7 @@ jobs:
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install addons and dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
*.py[cod]
/.venv
/.pytest_cache
/.ruff_cache

# C extensions
*.so
Expand Down
2 changes: 2 additions & 0 deletions .oca_hooks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MESSAGES_CONTROL]
disable=xml-deprecated-data-node,xml-deprecated-tree-attribute
43 changes: 1 addition & 42 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,45 +56,4 @@ repos:
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
# - repo: https://github.com/psf/black
# rev: 22.3.0
# hooks:
# - id: black
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v2.1.2
# hooks:
# - id: prettier
# name: prettier (with plugin-xml)
# additional_dependencies:
# - "[email protected]"
# - "@prettier/[email protected]"
# args:
# - --plugin=@prettier/plugin-xml
# files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
args:
- --keep-percent-format
- --py36-plus
# - repo: https://github.com/PyCQA/isort
# rev: 5.12.0
# language_version: python3.8
# hooks:
# - id: isort
# name: isort except __init__.py
# args:
# - --settings=.
# exclude: /__init__\.py$

20 changes: 1 addition & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,7 @@ A geospatial API is provided, to add your own functionalites at your convenience

[//]: # (addons)

Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[base_geoengine](base_geoengine/) | 12.0.1.3.0 | | Geospatial support for Odoo
[base_geoengine_demo](base_geoengine_demo/) | 12.0.1.0.3 | | Geo spatial support Demo
[base_geolocalize_company](base_geolocalize_company/) | 12.0.1.0.1 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | Add latitude and longitude fields on company model
[base_geolocalize_openstreetmap](base_geolocalize_openstreetmap/) | 12.0.1.1.0 | | Open street map API call to geolocalize an address
[base_google_map](base_google_map/) | 12.0.1.1.0 | [![gityopie](https://github.com/gityopie.png?size=30px)](https://github.com/gityopie) [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) | View modes and widgets to integrate Google Maps in your UI
[geoengine_base_geolocalize](geoengine_base_geolocalize/) | 12.0.1.0.1 | | Geospatial support for base_geolocalize
[geoengine_bing](geoengine_bing/) | 12.0.1.0.2 | | GeoEngine Bing Raster Support
[geoengine_partner](geoengine_partner/) | 12.0.1.0.0 | | Geospatial support of partners
[geoengine_swisstopo](geoengine_swisstopo/) | 12.0.1.1.0 | | GeoEngine - Swisstopo layers
[test_base_geoengine](test_base_geoengine/) | 12.0.1.1.0 | | test-base-geoengine
[web_view_google_map](web_view_google_map/) | 12.0.1.1.2 | [![gityopie](https://github.com/gityopie.png?size=30px)](https://github.com/gityopie) [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) | Add a Google Map view type to the Odoo web client
[web_view_leaflet_map](web_view_leaflet_map/) | 12.0.1.1.0 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | Integrate leaflet.js librairy with odoo and add new 'leaflet_map' view, to display markers.
[web_view_leaflet_map_partner](web_view_leaflet_map_partner/) | 12.0.1.0.1 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | TODO
[web_widget_google_map_drawing](web_widget_google_map_drawing/) | 12.0.1.1.0 | [![gityopie](https://github.com/gityopie.png?size=30px)](https://github.com/gityopie) [![brian10048](https://github.com/brian10048.png?size=30px)](https://github.com/brian10048) | Add drawing tools to Google Map view in Odoo
[web_widget_google_marker_icon_picker](web_widget_google_marker_icon_picker/) | 12.0.1.1.0 | [![gityopie](https://github.com/gityopie.png?size=30px)](https://github.com/gityopie) [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) | Google map widget allowing to set marker's color
This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.

[//]: # (end addons)

Expand Down
2 changes: 1 addition & 1 deletion base_geoengine/geo_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get_edit_info_for_geo_column(self, column):
'default_extent': view.default_extent or DEFAULT_EXTENT,
'default_zoom': view.default_zoom,
}
logger.debug(f"Parameters for geo field {column}:\n{res}")
logger.debug("Parameters for geo field {}:\n{}".format(column, res))
return res

@api.model
Expand Down
2 changes: 1 addition & 1 deletion geoengine_swisstopo/geo_view/geo_raster_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GeoRasterLayer(models.Model):
def _get_projection(self):
for record in self:
if record.raster_type == "swisstopo":
record.projection = f"EPSG:{record.matrix_set}"
record.projection = "EPSG:{}".format(record.matrix_set)
else:
record.projection = False

Expand Down

0 comments on commit 12150f3

Please sign in to comment.