Skip to content

Commit

Permalink
Merge a6c9f4a into 94c1339
Browse files Browse the repository at this point in the history
  • Loading branch information
murtuzasaleh committed Nov 14, 2019
2 parents 94c1339 + a6c9f4a commit 01e40a0
Show file tree
Hide file tree
Showing 16 changed files with 1,485 additions and 0 deletions.
99 changes: 99 additions & 0 deletions base_google_map/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
===============
Base Google Map
===============

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-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/12.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-12-0/geospatial-12-0-base_google_map
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/115/12.0
:alt: Try me on Runbot

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

This module allows you to setup Google Maps configuration.

**Table of contents**

.. contents::
:local:

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

This module will install `base_setup` and `base_geolocalize`.
*I recommend you to setup __Google Maps Key API__ and add it into Odoo `Settings > General` Settings when you installed this module*

*__List of Google APIs & services required in order to make all features works__*
- Geocoding API
- Maps JavaScript API
- Places API

Visit this [page](https://developers.google.com/maps/documentation/javascript/get-api-key) of how to get Google API Key

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/geospatial/issues/new?body=module:%20base_google_map%0Aversion:%2012.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

Contributors
~~~~~~~~~~~~

* Yopi Angi <yopiangi@gmail.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.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/12.0/base_google_map>`_ project on GitHub.

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

from . import models
from . import controllers
25 changes: 25 additions & 0 deletions base_google_map/__manifest__.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).

{
'name': 'Base Google Map',
'version': '12.0.1.0.0',
'author': 'Open Source Integrators, 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'
],
'images': ['static/description/thumbnails.png'],
'installable': True,
'maintainers': [
'gityopie',
'wolfhall'
],
}
3 changes: 3 additions & 0 deletions base_google_map/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

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

from odoo import http


class Main(http.Controller):

@http.route('/web/map_theme', type='json', auth='user')
def map_theme(self):
ICP = http.request.env['ir.config_parameter'].sudo()
theme = ICP.get_param('google.maps_theme', default='default')
res = {'theme': theme}
return res
6 changes: 6 additions & 0 deletions base_google_map/data/google_maps_libraries.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="1">
<function model="ir.config_parameter" name="set_param" eval="('google.maps_libraries', 'geometry,places')"/>
</data>
</odoo>

0 comments on commit 01e40a0

Please sign in to comment.