OdooWiki OCA HUB

Google Map View

web_view_google_map folder_open OCA/geospatial open_in_new
Extra Tools License: AGPL-3

This module adds a Google Maps view type and Places autocomplete field widgets to the Odoo web client.

Features:

  • google_map view mode to display geolocated records on Google Maps
  • Marker colors from view attributes (color / colors)
  • Marker clustering
  • Field widgets gplaces_autocomplete and gplaces_address_form

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds a Google Maps view to Odoo so users can see geolocated records (like contacts) as markers on a map, and adds Google Places autocomplete fields that fill in addresses and coordinates automatically.

This module adds a new "Google Map" view type to Odoo. On the Contacts app, the partner list action now includes a Google Map view alongside kanban, list and form, so users can switch to a map showing each contact as a marker. Markers are coloured by rule: persons in blue, companies in green, and nearby markers are grouped into clusters that split apart as you zoom in. Clicking a marker opens a small popup with the name, email and city, plus an "Open" link to the contact form. A "New" button lets users create a record directly from the map.

The map needs a Google Maps API key. If none is configured, the screen shows a message and a "Configure API key" button that opens the Google Maps settings. The map theme (default, night, dark, retro, aubergine) is read from the server configuration.

Two field widgets are also provided: a Google Places autocomplete field and an address form field. When a user types in them, Google suggests places; choosing one automatically fills the street, city, zip, country, phone, website and latitude/longitude fields on the record. These widgets work on text fields and can be configured with options such as which fields to fill and which latitude/longitude fields to use.

Technically, the module extends ir.ui.view and ir.actions.act_window.view to allow the new google_map view mode, and adds a Google Map view for res.partner.

Depends on

Models and fields (2)
  • ir.ui.view · extends an existing modeltype
  • ir.actions.act_window.view · extends an existing modelview_mode

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 3 confirmed, 6 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/geospatial.

terminal Installation and usage

OCA documentation · Odoo 19.0
  • Install Google Maps Integration (base_google_map).
  • Go to Settings → Google Maps Integration.
  • Set your Google Maps API key and enable the Places / Geometry libraries as needed.
  • Restrict the key in Google Cloud Console to your Odoo origins and the Maps JavaScript API / Places API.

Google Map view

Add a google_map view on any model that stores latitude/longitude:

<record id="view_partner_google_map" model="ir.ui.view">
    <field name="name">res.partner.google_map</field>
    <field name="model">res.partner</field>
    <field name="arch" type="xml">
        <google_map
            string="Map"
            lat="partner_latitude"
            lng="partner_longitude"
            colors="blue:company_type=='person';green:company_type=='company';"
        >
            <field name="partner_latitude" />
            <field name="partner_longitude" />
            <field name="display_name" />
            <field name="company_type" />
        </google_map>
    </field>
</record>

Include google_map in the action view_mode, for example list,form,google_map.

Contacts already expose a Google Map mode on the partner action.

Places widgets

<field
    name="street"
    widget="gplaces_address_form"
    options="{'lat': 'partner_latitude', 'lng': 'partner_longitude'}"
/>
<field
    name="name"
    widget="gplaces_autocomplete"
    options="{'lat': 'partner_latitude', 'lng': 'partner_longitude'}"
/>

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.