Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e0afbe3
[12.0][ADD] base_google_maps
murtuzasaleh Oct 21, 2019
3328c9f
[UPD] Update base_google_map.pot
oca-travis Nov 19, 2019
c259067
[UPD] README.rst
OCA-git-bot Nov 19, 2019
35d0fcc
[IMP] base_google_maps: promote to App
dreispt Nov 19, 2019
b72f186
Update icon.svg
max3903 Nov 21, 2019
3d11116
[UPD] README.rst
OCA-git-bot Nov 25, 2019
285a052
[IMP] base_google_map: black, isort, prettier
brian10048 Mar 10, 2021
75c8759
[14.0][MIG] Migrated a base_google_map module.
AmmarOfficewalaSerpentCS Apr 7, 2021
aa18ba6
[UPD] Update base_google_map.pot
oca-travis Aug 12, 2021
4531161
base_google_map 14.0.1.0.1
OCA-git-bot Aug 12, 2021
bc88d80
Added translation using Weblate (Persian (fa_IR))
mostafabarmshory Nov 19, 2024
15131d9
Added translation using Weblate (Italian)
mymage Jan 5, 2025
a7b7108
[MIG] base_google_map: Migration to 19.0
max3903 Jul 25, 2026
4fe8dd8
[UPD] Update base_google_map.pot
max3903 Jul 25, 2026
3593af2
[IMP] base_google_map: add demo Google Maps API key placeholder
max3903 Jul 25, 2026
42ead66
Merge PR #469 into 19.0
OCA-git-bot Jul 31, 2026
6b9abbd
[UPD] Update base_google_map.pot
Jul 31, 2026
816092f
[BOT] post-merge updates
OCA-git-bot Jul 31, 2026
cbe4b35
[ADD][12.0] google_maps
murtuzasaleh Oct 15, 2019
72ebc36
[UPD] README.rst
OCA-git-bot Nov 20, 2019
396f323
[UPD] Update web_view_google_map.pot
oca-travis Nov 20, 2019
c01aba3
[IMP] web_view_google_map: Create dynamic color marker.
murtuzasaleh Nov 22, 2019
6bb3a23
[IMP] web_view_google_map: Lint Errors
brian10048 Jun 4, 2020
09cf1e7
web_view_google_map 12.0.1.1.1
OCA-git-bot Jun 8, 2020
3a908dc
[IMP] web_view_google_map: black, isort, prettier
brian10048 Mar 10, 2021
b1a822a
[FIX] Fixed travis.
AmmarOfficewalaSerpentCS Apr 7, 2021
46db929
[FIX] fixed pre-commit errors
Urvisha-OSI Oct 31, 2022
6684a5f
[UPD] Update web_view_google_map.pot
oca-travis Oct 31, 2022
e63853a
[UPD] README.rst
OCA-git-bot Sep 3, 2023
0e4b360
Added translation using Weblate (Italian)
mymage Jan 5, 2025
964250a
[MIG] web_view_google_map: Migration to 19.0
max3903 Jul 25, 2026
c6f85bb
[UPD] Update web_view_google_map.pot
max3903 Jul 25, 2026
561a64f
[FIX] web_view_google_map: prettier formatting
max3903 Jul 25, 2026
544a0a9
Merge PR #468 into 19.0
OCA-git-bot Jul 31, 2026
63fe275
[UPD] Update web_view_google_map.pot
Jul 31, 2026
6507352
[BOT] post-merge updates
OCA-git-bot Jul 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ geospatial

[//]: # (addons)

This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[base_google_map](base_google_map/) | 19.0.1.0.0 | <a href='https://github.com/gityopie'><img src='https://github.com/gityopie.png' width='32' height='32' style='border-radius:50%;' alt='gityopie'/></a> <a href='https://github.com/wolfhall'><img src='https://github.com/wolfhall.png' width='32' height='32' style='border-radius:50%;' alt='wolfhall'/></a> | View modes and widgets to integrate Google Maps in your UI
[web_view_google_map](web_view_google_map/) | 19.0.1.0.0 | <a href='https://github.com/gityopie'><img src='https://github.com/gityopie.png' width='32' height='32' style='border-radius:50%;' alt='gityopie'/></a> <a href='https://github.com/wolfhall'><img src='https://github.com/wolfhall.png' width='32' height='32' style='border-radius:50%;' alt='wolfhall'/></a> | Add a Google Map view type to the Odoo web client

[//]: # (end addons)

Expand Down
137 changes: 137 additions & 0 deletions base_google_map/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=======================
Google Maps Integration
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:61306d4789f541af73a41c733a3beed454e84daf1d196b528d50f47ac18feb9d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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/19.0/base_google_map
:alt: OCA/geospatial
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/geospatial-19-0/geospatial-19-0-base_google_map
: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=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to setup Google Maps configuration for map views
and related widgets.

**Table of contents**

.. contents::
:local:

Configuration
=============

This module installs ``base_setup`` and ``base_geolocalize``.

After installation, configure the Google Maps API key under **Settings >
General Settings > Google Maps View**.

With demo data enabled, the module sets a placeholder value
``YOUR_GOOGLE_MAPS_API_KEY`` on the ``google.api_key_geocode`` system
parameter. Replace it with a real key from your Google Cloud project
before using maps in a demo database.

Google APIs and services required for all features:

- Geocoding API
- Maps JavaScript API
- Places API

See the `Google
documentation <https://developers.google.com/maps/documentation/javascript/get-api-key>`__
on how to get an API key.

Usage
=====

1. Go to **Settings > General Settings**.
2. Open the **Google Maps View** section.
3. Set the API key, theme, language and region.
4. Enable the Geometry and Places libraries as needed.
5. Optionally enable related Google Maps view or widget modules.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/geospatial/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 <https://github.com/OCA/geospatial/issues/new?body=module:%20base_google_map%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Gray Matter Logic

Contributors
------------

- Yopi Angi yopiangi@gmail.com
- `Gray Matter Logic <https://www.graymatterlogic.com>`__:

- Wolfgang Hall whall@opensourceintegrators.com
- Daniel Reis dreis@opensourceintegrators.com
- Ammar Officewala aofficewala@opensourceintegrators.com
- Maxime Chambreuil maxime.chambreuil@graymatterlogic.com

- Serpent Consulting Services Pvt. Ltd. support@serpentcs.com

Other credits
-------------

Module icon by Odoo S.A., LGPL 3.0

Maintainers
-----------

This module is maintained by the OCA.

.. 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.

.. |maintainer-gityopie| image:: https://github.com/gityopie.png?size=40px
:target: https://github.com/gityopie
:alt: gityopie
.. |maintainer-wolfhall| image:: https://github.com/wolfhall.png?size=40px
:target: https://github.com/wolfhall
:alt: wolfhall

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-gityopie| |maintainer-wolfhall|

This module is part of the `OCA/geospatial <https://github.com/OCA/geospatial/tree/19.0/base_google_map>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions base_google_map/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import controllers
from . import models
19 changes: 19 additions & 0 deletions base_google_map/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Google Maps Integration",
"summary": "View modes and widgets to integrate Google Maps in your UI",
"version": "19.0.1.0.0",
"author": "Gray Matter Logic, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/geospatial",
"license": "AGPL-3",
"category": "Extra Tools",
"depends": ["base_setup", "base_geolocalize"],
"data": ["data/google_maps_libraries.xml", "views/res_config_settings.xml"],
"demo": ["demo/base_google_map_ir_config_parameter.xml"],
"images": ["static/description/thumbnails.png"],
"installable": True,
"application": True,
"maintainers": ["gityopie", "wolfhall"],
}
4 changes: 4 additions & 0 deletions base_google_map/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import main
25 changes: 25 additions & 0 deletions base_google_map/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import http
from odoo.tools.safe_eval import safe_eval


class Main(http.Controller):
@http.route("/web/map_theme", type="jsonrpc", auth="user")
def map_theme(self):
icp = http.request.env["ir.config_parameter"].sudo()
theme = icp.get_param("google.maps_theme", default="default")
return {"theme": theme}

@http.route("/web/google_autocomplete_conf", type="jsonrpc", auth="user")
def google_autocomplete_settings(self):
get_param = http.request.env["ir.config_parameter"].sudo().get_param
is_lang_restrict = safe_eval(
get_param("web_google_maps.autocomplete_lang_restrict", default="False")
)
lang = get_param("web_google_maps.lang_localization", default=False)
result = {}
if is_lang_restrict and lang:
result["language"] = lang
return result
8 changes: 8 additions & 0 deletions base_google_map/data/google_maps_libraries.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<function
model="ir.config_parameter"
name="set_param"
eval="('google.maps_libraries', 'geometry,places')"
/>
</odoo>
12 changes: 12 additions & 0 deletions base_google_map/demo/base_google_map_ir_config_parameter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!--
Placeholder only — replace with a real key from Google Cloud Console.
Required APIs: Geocoding API, Maps JavaScript API, Places API.
-->
<function
model="ir.config_parameter"
name="set_param"
eval="('google.api_key_geocode', 'YOUR_GOOGLE_MAPS_API_KEY')"
/>
</odoo>
Loading