Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][BR000275][MIG] Migrate website_event_baidu_map from 8.0 to 12.0 #248

Open
wants to merge 12 commits into
base: 12.0
Choose a base branch
from
58 changes: 58 additions & 0 deletions website_event_baidu_map/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3

=======================
website_event_baidu_map
=======================

This module replace google map with baidu map of the website event module. The address is only based on street field.

Installation
============

To install this module, you need to:

* have basic modules installed (website, base, website_event)


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

Bugs are tracked on `GitHub Issues <https://github.com/Elico-Corp/odoo-addons/issues>`_.
In case of trouble, please check there if your issue has already been reported.

Credits
=======

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

* Liu Lixia <[email protected]>

Maintainer
----------

.. image:: https://www.elico-corp.com/logo.png
:alt: Elico Corp
:target: https://www.elico-corp.com

This module is maintained by Elico Corporation.

Elico Corp is an innovative actor in China, Hong-Kong and Singapore servicing
well known international companies and as well as local mid-sized businesses.
Since 2010, our seasoned Sino-European consultants have been providing full
range Odoo services:

* Business consultancy for Gap analysis, BPM, operational work-flows review.
* Ready-to-use ERP packages aimed at starting businesses.
* Odoo implementation for manufacturing, international trading, service industry
and e-commerce.
* Connectors and integration with 3rd party software (Magento, Taobao, Coswin,
Joomla, Prestashop, Tradevine etc...).
* Odoo Support services such as developments, training, maintenance and hosting.

Our headquarters are located in Shanghai with branch in Singapore servicing
customers from all over Asia Pacific.

Contact information: `Sales <[email protected]>`__
Empty file.
20 changes: 20 additions & 0 deletions website_event_baidu_map/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# © 2015-2019 Elico corp (www.elico-corp.com)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
'name': 'Website Event Baidu Map',
'version': '12.0.1.0.0',
'category': 'Website',
'depends': [
'website_baidu_map',
'website_event',
],
'author': 'Elico Corp',
'support': 'Elico Corp',
'license': 'LGPL-3',
'website': 'https://www.elico-corp.com',
'data': [
'views/website_event_baidu_map.xml',
],
'installable': True,
'application': False,
}
28 changes: 28 additions & 0 deletions website_event_baidu_map/views/website_event_baidu_map.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
ruter-lyu marked this conversation as resolved.
Show resolved Hide resolved
<!--
© 2015-2019 Shanghai Elico Limited.
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->
<odoo>
<template id="event_description_full_inherited" name="map" inherit_id="website_event.event_description_full">
<xpath expr="//div[hasclass('card-body')]/t/a" position="replace">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html {width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}
#baidu_map{width:100%;height:250px;}
p{margin-left:5px; font-size:14px;}
</style>
<div id="baidu_map"></div>
<script type="text/javascript">
var map = new BMap.Map("baidu_map");
map.centerAndZoom(new BMap.Point(121.480237, 31.236305), 11);
map.enableScrollWheelZoom();
var local = new BMap.LocalSearch(map, {
renderOptions:{map: map, autoViewport: true}
});
local.search('<t t-esc="event.address_id.street"/>');
</script>
</xpath>
</template>
</odoo>