Metadata-Version: 2.1
Name: odoo-addon-web_view_google_map
Version: 19.0.1.0.2.1
Requires-Dist: odoo-addon-base_google_map==19.0.*
Requires-Dist: odoo==19.0.*
Summary: Add a Google Map view type to the Odoo web client
Home-page: https://github.com/OCA/geospatial
License: AGPL-3
Author: Open Source Integrators, Gray Matter Logic, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

===============
Google Map View
===============

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

.. |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/web_view_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-web_view_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 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``

**Table of contents**

.. contents::
   :local:

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

1. Install **Google Maps Integration** (``base_google_map``).
2. Go to *Settings → Google Maps Integration*.
3. Set your Google Maps API key and enable the **Places** / **Geometry**
   libraries as needed.
4. Restrict the key in Google Cloud Console to your Odoo origins and the
   Maps JavaScript API / Places API.

Usage
=====

Google Map view
---------------

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

.. code:: xml

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

.. code:: xml

   <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'}"
   />

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:%20web_view_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
-------

* Open Source Integrators
* Gray Matter Logic

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

- Yopi Angi <yopiangi@gmail.com>
- Wolfgang Hall <whall@opensourceintegrators.com>
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
- Ammar Officewala <aofficewala@opensourceintegrators.com>
- `Gray Matter Logic <https://www.graymatterlogic.com>`__:

  - Maxime Chambreuil <maxime.chambreuil@graymatterlogic.com>

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/web_view_google_map>`_ project on GitHub.

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