diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..41ac0af --- /dev/null +++ b/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from . import controllers diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000..6814330 --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +{ + 'name': 'Google Maps', + 'category': 'Website/Website', + 'summary': 'Show your company address on Google Maps', + 'version': '1.0', + 'description': """ +Show your company address/partner address on Google Maps. Configure an API key in the Website settings. + """, + 'depends': ['base_geolocalize', 'website_partner'], + 'data': [ + 'views/google_map_templates.xml', + ], + 'installable': True, + 'license': 'LGPL-3', +} diff --git a/controllers/__init__.py b/controllers/__init__.py new file mode 100644 index 0000000..5d4b25d --- /dev/null +++ b/controllers/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import main diff --git a/controllers/main.py b/controllers/main.py new file mode 100644 index 0000000..1d3d9fe --- /dev/null +++ b/controllers/main.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from odoo import http +from odoo.http import request +from odoo.tools.json import scriptsafe + + +class GoogleMap(http.Controller): + ''' + This class generates on-the-fly partner maps that can be reused in every + website page. To do so, just use an ``